PHP and mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
The warning has nothing to do with any of the Fcgidxxx
options and is simply caused by client's closing their side of the connection before the server gets a chance to respond.
From the actual source:
/* Now pass any remaining response body data to output filters */
if ((rv = ap_pass_brigade(r->output_filters, brigade_stdout)) != APR_SUCCESS) {
if (!APR_STATUS_IS_ECONNABORTED(rv)) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
"mod_fcgid: ap_pass_brigade failed in "
"handle_request_ipc function");
}
return HTTP_INTERNAL_SERVER_ERROR;
}
Credit goes to Avian's Blog who found out about it.
mod_fcgid: ap_pass_brigade failed in handle_request function
By default FastCGI processes exit after 500 requests. You can either raise PHP_FCGI_MAX_REQUESTS (in the wrapper) or limit FcgidMaxRequestsPerProcess to 500.
See http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#examples "Special PHP considerations"
mod_fcgid + PHP + apache lockup
I managed to fix this one myself.
To solve this problem add in stricter checks in the FastCGI configuration for process hangs, and reduce the lifetime of your PHP instances:
IPCConnectTimeout 20
ProcessLifeTime 120
IdleTimeout 60
IdleScanInterval 30
MaxRequestsPerProcess 499
MaxProcessCount 100
Depending on your requirements, this can satisfy a well-configured server that has in excess of 50k hits per hour.
You will find the number of recorded defunct / "zombie" PHP processes increases significantly. This is good, however, as previously the processes would have simply become unresponsive and the FastCGI manager would have continued to pipe requests to them!
I would also advise removing all override directives from your php.fcgi script, as this can cause problems with your system. Try to manage as much as possible from the primary FastCGI configuration in Apache.
(70007)The timeout specified has expired: mod_fcgid: can't get data from http client
You will need change few things in your php.ini file
- max_execution_time = 1500; or more as per your need
- max_input_time = 1500; or more as per your need
- post_max_size = 500M; or more as per your need
Related Topics
Php.Ini Is Nonexistent Loaded Configuration File (None)
How to Add Anchor Tag to a Url from Text Input
How to Find Unused Functions in a PHP Project
Php: How to Call Function of a Child Class from Parent Class
How to Increase Memory Limit for PHP Over 2Gb
How to Schedule the Execution of a PHP Script on the Server Side
PHP Pdo Prepare Repetitive Variables
No Application Encryption Key Has Been Specified
Not Equal to != and !== in PHP
Executing a Shell Script in Background with PHP
Get Date Range Between Two Dates Excluding Weekends
Getting Http Code in PHP Using Curl
PHP Check Whether Property Exists in Object or Class
Can You Add an If Statement in Order By