FastCGI returns “500 Internal Server Error” and timeout error during the backup.

I am getting “500 Internal Server Error” when try to backup my website. How to solve it?

The error you get refers to the mod_fcgid and timeout limits. It happens when the hosting/server has time limits that does not allow some large files to be transferred.

1) In order to solve timeout problem, you have to increase timeout limits:

open file /etc/httpd/conf.d/fcgid.conf and add FcgidIOTimeout 90 or 120.

2) To fix “500 Internal Server Error” from Nginx timing follow the steps:

open file /etc/nginx/nginx.conf and add the following:

keepalive_timeout 125;
proxy_read_timeout 125;
proxy_connect_timeout 125;
fastcgi_read_timeout 125;

3) You can also try to increase max_execution_time in php.ini.file

If you have access to FTP settings, open php.ini file and add there max_execution_time = 120 (script running 120 seconds).

4) You can also add the following code in .htaccess file:

<IfModule mod_fcgid.c>
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 64
DefaultMaxClassProcessCount 8
IPCConnectTimeout 300
IPCCommTimeout 7200
BusyTimeout 300

</IfModule>

NOTE: some hostings/server do not allow this option in .htaccess file. In this case, add the lines from above to your vhost.
5) In case you get “MySQL server has gone away” error use the following:

in file /etc/my.conf add wait_timeout = 120

Leave a Reply

Your email address will not be published. Required fields are marked *

code