title: PHP and mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
body: <p>This has been asked and answered before <a href="https://stackoverflow.com/a/12686252/219116">https://stackoverflow.com/a/12686252/219116</a> but, the solution there is not working for me.</p>
  
  <p>mod_fcgid config</p>
  
  <pre><code>&lt;IfModule mod_fcgid.c&gt;
    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
  
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>php-cgi script</p>
  
  <pre><code>#!/bin/bassh
  export PHPRC=/var/www/vhosts/example.com/etc/
  export PHP_FCGI_MAX_REQUESTS=5000
  exec /usr/bin/php-cgi
  </code></pre>
  
  <p>System details</p>
  
  <ul>
  <li>CentOS Linux release 7.1.1503 (Core)</li>
  <li>httpd-2.4.6-31.el7.centos.x86_64</li>
  <li>mod_fcgid-2.3.9-4.el7.x86_64</li>
  <li>php56u-cli-5.6.12-1.ius.centos7.x86_64</li>
  </ul>
  
  <p>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</p>
  
  <pre><code>[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
  </code></pre>