I need to make PHP execution longer, and whatever else might be a problem. I thought I'd already done so but I'm still getting gateway timeouts from my recent wordpress install. The php-fpm pool has the following configuration
[john]
user = john
group = john
listen = 127.0.0.1:9002
listen.owner = www
listen.group = www
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php_admin_value[max_execution_time] = 300
php_admin_value[max_input_time] = 120
The syntax is okay but with scripts timing out in about 30 seconds I wonder what else I have missed. It might be overkill but I'm in a hurry and will learn later, feel free to explain, but if someone could tell me all the values I could increase to hit this problem with brute force and solve it that would be great.
I'd start by setting max input and execution time manually in your php.ini instead of trying to override any setting on php-fpm or nginx.
In /etc/php5/fpm/pool.d/www.conf add this line:
Also, in /etc/nginx/sites-available/default add the following line to the location block of the server in question:
The entire location block looks like this:
Now just restart php-fpm and nginx and there should be no more timeouts for requests taking less than 180 seconds.