I am having a problem on my server when the PHP
mail() function is being used in a browser, so through Apache.
When the script, lets call it
mailtest.php, is being called through a browser, there is a 60 second delay in actually sending the message.
When I call
php mailtest.php from the commandline, the mail is sent instantly, no delay.
After a restart of Apache, the delay is gone. However, it returns after a couple of hours.
I did an Strace and here you can see a delay of 30 seconds at the end.
13076 09:38:02 clone( <unfinished ...> 13076 09:38:32 <... clone resumed> child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xa5f346f8) = 13160
It's a virtual server btw running Debian.
Any ideas? I'm getting desperate.