#Step 1
Raise max_execution_time setting in php.ini file (CentOS path is /etc/php.ini):
max_execution_time = 300
#Step 2
/etc/php-fpm.d/www.conf
Then set the variable to the same value as max_execution_time:
request_terminate_timeout = 300
#Step 3
Add fastcgi_read_timeout variable inside our Nginx virtual host configuration:
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;
}