0

I have a strange error in my Centos 7.9 Server running with Postfix as the Sendmailer program, It has a Website running in PHP-7.4

I get the below error Once in a while (not everyday but weekly or so)

Could not execute: /usr/sbin/sendmail

To fix the issue all i have to do is to restart the php-fpm service,

 service php-fpm restart

Does anyone has any idea on why this is happening? And any known fixes to this issues.

Note: I did my research before this, most people saying it's a permission issue, but it's not true in my case as the simple restart of the php-fpm service seems to have fix it. Also we don't use any third party packages like phpmailer to send emails.

No SELinux interference as well, as SELinux runs on permissive mode.

UPDATE: This looks like memory leak in the php-fpm process, when i looked at the process it consumed 1.4GB and keep on increasing, I suspect it eventually crash the system, when try to send emails.

mahen3d
  • 4,342
  • 14
  • 36
  • 57
  • This will be a pain to solve without proper logging of the underlying error that prevents `sendmail` from being run... – Ginnungagap Oct 24 '21 at 07:21
  • @Ginnungagap what other log information you need? this is all i could find, do you have any idea on which log file i need to look into? – mahen3d Oct 24 '21 at 09:15
  • Probably a resource limit problem, given that the process is leaking. Check the system logs, but it would be nice if the PHP script would log why it couldn't run sendmail, no just the fact that it failed. – Lacek Oct 26 '21 at 08:30

0 Answers0