To fix this error do the following:
in your php.ini raise:
max_execution_time = 300
In your /etc/php-fpm.d/www.conf file add this if you dont have:
request_terminate_timeout = 300
In your Nginx virtual host configuration you neeed to add fastcgi_read_timeout
It should look like this:
location ~ .php$ {
root /var/www/sites/nginxtips.com;
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 300;
}
Than restart Nginx
Links that help: