If you have wordpress site or other website with limited resource, your will get error message “504 Gateway Time-out”. So here is how to increase the timeout your website.
Step 1: Edit php.ini
1 |
# nano /etc/php5/fpm/php.ini |
1 |
max_execution_time = 300 |
Step 2: Edit PHP-FPM
1 |
# nano /etc/php5/fpm/pool.d/www.conf |
Set …
1 |
request_terminate_timeout = 300 |
Step 3: Edit Nginx Config
1 |
# nano /etc/nginx/sites-available/your-domain.com |
Set …
1 |
fastcgi_read_timeout 300; |
1 |
# nano /etc/nginx/nginx.conf |
Set …
1 2 3 4 5 |
http { #... fastcgi_read_timeout 300; #... } |
Step 4: Restart PHP-FPM & Nginx
1 2 |
service php5-fpm restart service nginx restart |