I’m looking for more information on the following options for PHP script execution mode.
Apache mod_php (run as Apache’s user)
CGI wrapper (run as virtual server owner)
FCGId (run as virtual server owner)
Since going from PHP 5.3 to 5.5, (CentOS 6.5 to 7) I’ve got a script (I really need) that crashes randomly. What I’ve noticed is that sometimes going from FCGId to Apache or CGI seems to help for a little while but ultimately there are problems.
In FCGI mode:
Server error log:
[Wed Nov 19 06:53:18.480673 2014] [fcgid:warn] [pid 26936] (104)Connection reset by peer: [client IP] mod_fcgid: error reading data from FastCGI server, referer: https://SITE/index.php/admin/icecatimport/adminhtml_scan/ajaxall/key/d4cde8f71d412828162b209fa/
[Wed Nov 19 06:53:18.480762 2014] [core:error] [pid 26936] [client IP] End of script output before headers: index.php, referer: https://SITE/index.php/admin/icecatimport/adminhtml_scan/ajaxall/key/d4c9cde8f71d412828162b209fa/
In CGI mode:
[Mon Nov 24 10:25:25.608312 2014] [cgi:warn] [pid 16440] [client 207.96.171.156:61344] AH01220: Timeout waiting for output from CGI script /home/ncds/cgi-bin/php5.cgi, referer: https://www.mysite.com/index.php/admin/icecatimport/adminhtml_scan/ajaxall/key/e2b50c5f49a0acba55c5143e014/
[Mon Nov 24 10:25:25.608399 2014] [cgi:error] [pid 16440] [client 207.96.171.156:61344] Script timed out before returning headers: php5.cgi, referer: https://www.mysite.com/index.php/admin/icecatimport/adminhtml_scan/ajaxall/key/dc1ace2b50c5f49a0acba55c5143e014/
[Mon Nov 24 10:26:25.639697 2014] [cgi:warn] [pid 16440] [client 207.96.171.156:61344] AH01220: Timeout waiting for output from CGI script /home/my_site/cgi-bin/php5.cgi, referer: https://www.mysite.com/index.php/admin/icecatimport/adminhtml_scan/ajaxall/key/e2b50c5f49a0acba55c5143e014/
I’ve looked for information on the web and everything basically says to configure FCGI but nothing about CGI or mod_php. I’m hoping that by changing modes I will gain some stability.
I don’t know if for CGI what values I need to put in /home/my_site/cgi-bin/php5.cgi or if they go in my httpd.conf.
What I would like to know is, where can I configure the timeouts for Apache mod_php and CGI? What do the timeout values for max execution time and max input time (from FCGI) look like?