mod_fcgid: read data timeout

2.6k Views Asked by At

My application have a process that runs once a day and it takes more than 5 minutes to finish.

Before it finishes, I'm getting these errors in the log file:

mod_fcgid: read data timeout in 301 seconds
End of script output before headers: index.php

I know there's several topics on internet about it, but no one solved my problem.

I have already tried these changes:

/etc/php5/apache2/php.ini

max_execution_time = 3200

/etc/apache2/mods-available/fcgid.conf

<IfModule mod_fcgid.c>
  FcgidConnectTimeout 9999
  FcgidIOTimeout 2300
  FcgidBusyTimeout 2300
  FcgidIdleTimeout 2300
  BusyTimeout 2300
  ProcessLifeTime 7200
  IPCConnectTimeout 2300
  IPCCommTimeout 7200

  <IfModule mod_mime.c>
    AddHandler fcgid-script .fcgi
  </IfModule>
</IfModule>

/etc/apache2/sites-available/myapp.conf

<VirtualHost *:80>
        ...
        IPCCommTimeout 9999
        IPCConnectTimeout 9999
        FcgidIOTimeout 2300
        FcgidBusyTimeout 2300
        FcgidMaxRequestLen 10737418240
        ...
</VirtualHost>

After all, I'm still getting the same error after 5 minutes of execution. Does anyone have any idea how to fix it please?

1

There are 1 best solutions below

1
Nadir Latif On

Are you sure you edited the correct php.ini file?. It seems your application is being run from the command line.

Php files run from command line usually have a separate php.ini file. You can get the path to your php.ini file by entering php -i command from the command line.