So, it turns out it this was a file permissions issue.
My ini directory was owned root:apache and changing to root:root suddenly got the config picked up.
No errors were raised informing me of the bad permissions though
It is not clear whether you are using any opcode cacher like APC
. First of all, make it enabled. Adjust its the memory to avoid fragmentation. Also, use socket, not http connection from nginx
to php5-fpm
, and place that socket on /dev/shm
.
In nginx, use fastcgi_pass unix:/dev/shm/php5-fpm.sock;
, and change php5-fpm's config accordingly.
Try to lower pm.max_children
to something more realistic like 30-40-50-60 and see the load and free memory with free -m
. See if clients getting any 502/504 errors. Lower pm.start_servers
, min and max_spare accordingly (15, 5, 25).
If there is a lot of anonymous users, consider to use any caching plugin for wordpress like WP-FFPC
, WP Super Cache
or similar.
Disable gzipping if you have it enabled in nginx.
Perhaps you need to adjust fastcgi_buffer_size
and fastcgi_buffers
options in nginx.
Check if you have Query cache enabled and sufficient on Mysql.
Have monitoring system like munin
installed on the site in order to check load/memory consumption/latency etc.
Best Answer
The FastCGI timeout has nothing to do with PHP's internal execution time limit - it's the time the web server process waits for the CGI process to finish its output. On Apache, it'd be the
idle-timeout
setting:Maybe there is something similar for IIS.