pipe delivery process timed out

ifbtech

Registered
Aug 2, 2004
3
0
151
I'm getting this error in exim_mainlog for a couple pipes:

2013-11-08 09:23:27 1Vemy7-0000JQ-EJ <= [email protected] H=h58.185.17.198.static.ip.windstream.net (HP) [198.17.185.58]:60255 P=esmtpa A=dovecot_login:[email protected] S=6297 i
[email protected] T="Good Morning" for [email protected]
2013-11-08 09:23:27 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1Vemy7-0000JQ-EJ
2013-11-08 10:23:27 1Vemy7-0000JQ-EJ ** |/home/domain/public_html/mt/pipe-goodmorning.php ([email protected]rg) <[email protected]> R=virtual_aliases_nostar T=jailed_virtual_address_pipe: pipe delivery process timed out
2013-11-08 10:23:27 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1Vemy7-0000JQ-EJ
2013-11-08 10:23:27 1VenuB-0004NI-NT <= <> R=1Vemy7-0000JQ-EJ U=mailnull P=local S=7188 T="Mail delivery failed: returning message to sender" for [email protected]
2013-11-08 10:23:27 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1VenuB-0004NI-NT
2013-11-08 10:23:28 1Vemy7-0000JQ-EJ Completed
2013-11-08 10:23:28 1VenuB-0004NI-NT => sendinguser <[email protected]> R=virtual_user T=virtual_userdelivery
2013-11-08 10:23:28 1VenuB-0004NI-NT Completed

My PHP pipe file starts with:
#!/usr/bin/php -q

The php process runs for an hour and then is killed and the bounce message sent to the sender. The actual processing is complete in less than a minute. I had it save to a log file and that file shows it's done with a timestamp of Nov 8 09:23.

These pipes have worked fine for years and then I moved the account to a new server with most everything the same. PHP is newer, I'm using FastCGI now where I was using mod_php before but I don't think that should affect this at all.

I've tried adding set_time_limit(600) to get the PHP process to just close after 10 minutes but it doesn't work. I've tried adding an exit; to make sure it dies but no luck.

Thanks in advance for the help!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

I see you have opened a support ticket for this issue. I will update this thread with the outcome once the ticket is closed.

Thank you.
 

ifbtech

Registered
Aug 2, 2004
3
0
151
Thanks, here's the solution:

/usr/bin/php is intended for use with the web server, and /usr/local/bin/php is the CLI version. I suspect that your previous server must have been compiled without FastCGI support, meaning that /usr/bin/php on that server would have been configured with a different SAPI than the current server.

A FastCGI PHP binary will process its first request, and then sit open, waiting for additional requests, until it's killed.

I changed the shebang to /usr/local/bin/php and now it's all good!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
I am happy to hear the issue is now resolved. Thank you for updating this thread with the solution.