Apache mod_fcgid documentation lists out another possibility which the
HTTP 500 error may occur, which is due to limit of PHP_FCGI_MAX_REQUESTS
and/or FcgidMaxRequestsPerProcess.
PHP FastCGI processes exit after handling 500 requests, and they may
exit after this module has already connected to the application and sent
the next request, resulting in 500 Internal Server Error.
Thus if above timeout limit change to FcgidBusyTimeout doesn’t fix
the issue, try the one of following instead (these directives can be
configured in a corresponding wrapper script which is configured via
FcgidWrapper directive):
- Set PHP_FCGI_MAX_REQUESTS to 0 to disable (may cause problem if the PHP application leaks resources)
- Set PHP_FCGI_MAX_REQUESTS can be set to a much higher value than the default to reduce the frequency of recycling of processes.
- FcgidMaxRequestsPerProcess can be set to a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the problem.
For configuration examples of the PHP_FCGI_MAX_REQUESTS, check out
examples in mod_fcgid documentation