Bug 23309 - Could not execute mail delivery program
Summary: Could not execute mail delivery program
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-1.3
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.3.28
Hardware: All Linux
: P3 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-21 19:57 UTC by Mathieu
Modified: 2007-08-02 12:13 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu 2003-09-21 19:57:20 UTC
Well, I have a very strange error, that happens only some times, randomly : i'm 
suddenly not able anymore to use the php mail() fonction :

Warning: mail(): Could not execute mail delivery program 

Then I rehash Apache ( /etc/init.d/httpd reload ), and it works fine again.

My PHP configuration is OK, and my mail server too. When I execute my PHP 
script from the shell, there's no problem and the mail is sent. It's why it's 
an Apache problem, I'm quite sure.

If it could help, my PHP is installed as a CGI module, and I'm running Apache 
with -DSSL attribute and all the modules dynamically configured

Note : The error has occured on my 2 servers, that have the same apache 
configuration. 

I saw on some forums that some guys had the same problem, but i couldnt find 
any solution. Could you help ?

Thank you very much !
Comment 1 André Malo 2003-09-21 20:09:51 UTC
Would be nice if you could find out, *why* the mail delivery program could not
be started. Without that info we can only guess here.

Thanks.
Comment 2 Mathieu 2003-09-21 20:20:01 UTC
But how could I ? I've just this error message, and nothing else. Nothing 
special in error_log or cgi.log

My mail program works fine, as i can use it from shell, but through apache, it 
bugs sometimes. It's not a load problem because my second server is new and 
there's no load on it. 

And the weirdest : /etc/init/httpd reload, and it works again...

Comment 3 André Malo 2003-09-21 20:33:51 UTC
Hmm. I don't know how to get the error code from PHP. The technical flow is about:
* pipe program (or get error)
* write to pipe (or get error)
* close pipe (or get error)

One of these errors you hit. We must know, which one. I can imagine that you hit
system limits, either number of open files or number of forked processes. What
does ulimit -a say within the apache environment say?
Comment 4 Mathieu 2003-09-21 20:51:16 UTC
Well as I told you my new server has a really low load, there are only a few 
requests per hour, and everything is logged into access_log, so i dont think 
its a system memory problem or something like that...

And the problem is that it's working now, so i cant test anything, but would 
you have any idea of what i should do the next time it happens ?
Comment 5 Mathieu 2003-09-25 16:54:15 UTC
Hello,

I've identified the problem : Apache is unable to fork, and its why the mail 
program doesnt work. 

What should I do to avoid that ? Which parameters should I adjust in my config ?

Thanks