httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Toscano <toscano.l...@gmail.com>
Subject Re: [users@httpd] PHP and mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
Date Fri, 11 Dec 2015 07:50:52 GMT
I would set it to a value that is the upper bound of your responses' size
(it might already be the case, please check /proc/sys/net/ipv4/tcp_wmem).
This should avoid blocking fcgid's while flushing data due to slow external
clients, avoiding also weird timeouts set in the response processing chain.
The httpd's sockets should be instructed to use SO_SNDBUF so remember to
tune the TCP stack accordingly.

This is probably not the solution but it might be a good try to narrow down
the root cause of the issue.

Let me know!

Luca

2015-12-10 18:09 GMT+01:00 Steven Barre <steven@realestatewebmasters.com>:

> I haven't yet been able to determine a pattern of when it happens. It
> seems to be all kinds of requests (for PHP pages) that is causing it. We
> even have a few different CMSs and they are all doing it, so I don't think
> its a PHP code issue.
>
> What would you recommend I set SendBufferSize to? Its currently not set in
> my configs and so is the default.
>
> =================================================
> Steven Barre, RHCEsteven@realestatewebmasters.com
>
> Systems Administrator
> Real Estate Webmasters - 250-753-9893
> ==================================================
>
> On 2015-12-10 07:52, Luca Toscano wrote:
>
> Hi Steven,
>
> from [1] it appears that something goes wrong when flushing data to the
> output filters chain. Does it happen with a specific set of requests or
> randomly?
>
> Shot in the dark: have you also tried to increase the Apache
> SendBufferSize (
> https://httpd.apache.org/docs/2.4/mod/mpm_common.html#sendbuffersize)?
>
> Luca
>
>
> [1]:
> https://github.com/xyntrix/mod_fcgid/blob/98e699ccc94ec74886504b40b7703d7282bccd60/modules/fcgid/fcgid_bridge.c#L403
>
> 2015-12-07 19:24 GMT+01:00 Steven Barre <steven@realestatewebmasters.com>:
>
>> OK, so I've been trying to solve this for a while now,. and I still can't
>> even figure out what this error means. Can someone tell me what has gone
>> wrong in fcgi to cause this error?
>>
>> I posted on Stack Overflow, but haven't gotten much help yet so I'm
>> trying this mailing list.
>> http://stackoverflow.com/questions/33811543/php-and-mod-fcgid-ap-pass-brigade-failed-in-handle-request-ipc-function
>>
>> ========================================
>>
>> This has been asked and answered before
>> <http://stackoverflow.com/a/12686252/219116>
>> http://stackoverflow.com/a/12686252/219116 but, the solution there is
>> not working for me.
>>
>> mod_fcgid config
>>
>>     <IfModule mod_fcgid.c>
>>       AddHandler    fcgid-script .fcgi
>>       FcgidIPCDir /var/run/mod_fcgid/
>>       FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
>>
>>       FcgidIdleTimeout 60
>>       FcgidProcessLifeTime 120
>>       FcgidMaxRequestsPerProcess 500
>>       FcgidMaxProcesses 150
>>       FcgidMaxProcessesPerClass 144
>>       FcgidMinProcessesPerClass 0
>>       FcgidConnectTimeout 30
>>       FcgidIOTimeout 600
>>       FcgidIdleScanInterval 10
>>       FcgidMaxRequestLen 269484032
>>
>>     </IfModule>
>>
>> php-cgi script
>>
>>     #!/bin/bassh
>>     export PHPRC=/var/www/vhosts/example.com/etc/
>>     export PHP_FCGI_MAX_REQUESTS=5000
>>     exec /usr/bin/php-cgi
>>
>> System details
>>
>>  - CentOS Linux release 7.1.1503 (Core)
>>  - httpd-2.4.6-31.el7.centos.x86_64
>>  - mod_fcgid-2.3.9-4.el7.x86_64
>>  - php56u-cli-5.6.12-1.ius.centos7.x86_64
>>
>> So my FcgidMaxRequestsPerProcess is set to 500 and my
>> PHP_FCGI_MAX_REQUESTS is set to 10x that as suggested in the previous
>> answers and the Apache documentation. And yet I still get these errors
>>
>>     [Thu Nov 19 18:16:48.197238 2015] [fcgid:warn] [pid 6468:tid
>> 139726677858048]
>>     (32)Broken pipe: [client X.X.X.X:41098] mod_fcgid: ap_pass_brigade
>> failed in handle_request_ipc function
>>
>> --
>> =================================================
>> Steven Barre, RHCE
>> steven@realestatewebmasters.com
>>
>> Systems Administrator
>> Real Estate Webmasters - 250-753-9893
>> ==================================================
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>

Mime
View raw message