Answer the question
In order to leave comments, you need to log in
Why does sending mail via php mail() stop working over time?
vds on digitalocean, tariff for $5 - 512 ram of RAM
The server runs centos 6.4 + php 5.5 + httpd + mysql
Sites - 4 pieces, all test, without strong activity.
Sites do not slow down when loading.
The mailer costs postfix.
After start httpd - mail sends normally. After a while I get the following messages:
string(36) "Could not instantiate mail function."
Warning: mail(): Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /var/www/public_html/includes/test.php on line 14
error 1 - php mailer class output, error 2 - output of the usual mail function.
Through the console at this time sending mail works. those. the problem is clearly in php + httpd.
It seems to me that the problem is lack of memory.
However, a swap was made, which is maximum occupied by 50%, and the main RAM is either 50% or 90% full.
In logs /var/log/maillog it is deaf. In the httpd logs - the same as above.
/usr/sbin/sendmail is a symbolic link to /alternatives/mta, which in turn leads to /usr/sbin/sendmail.postfix, i.e. shipping goes through it. sendmail itself is not installed.
Any ideas?
Answer the question
In order to leave comments, you need to log in
most likely out of memory.
do you use prefork on apache? If yes, how many childs?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question