title: mod_fcgid: read data timeout
body: <p>My application have a process that runs once a day and it takes more than 5 minutes to finish.</p>
  
  <p>Before it finishes, I'm getting these errors in the log file:</p>
  
  <pre><code>mod_fcgid: read data timeout in 301 seconds
  End of script output before headers: index.php
  </code></pre>
  
  <p>I know there's several topics on internet about it, but no one solved my problem.</p>
  
  <p>I have already tried these changes:</p>
  
  <p>/etc/php5/apache2/php.ini</p>
  
  <pre><code>max_execution_time = 3200
  </code></pre>
  
  <p>/etc/apache2/mods-available/fcgid.conf</p>
  
  <pre><code>&lt;IfModule mod_fcgid.c&gt;
    FcgidConnectTimeout 9999
    FcgidIOTimeout 2300
    FcgidBusyTimeout 2300
    FcgidIdleTimeout 2300
    BusyTimeout 2300
    ProcessLifeTime 7200
    IPCConnectTimeout 2300
    IPCCommTimeout 7200
  
    &lt;IfModule mod_mime.c&gt;
      AddHandler fcgid-script .fcgi
    &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>/etc/apache2/sites-available/myapp.conf</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ...
          IPCCommTimeout 9999
          IPCConnectTimeout 9999
          FcgidIOTimeout 2300
          FcgidBusyTimeout 2300
          FcgidMaxRequestLen 10737418240
          ...
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>After all, I'm still getting the same error after 5 minutes of execution.
  Does anyone have any idea how to fix it please?</p>