We have a WordPress based website that gets about 1.5 million pageviews per day. Maximum concurrent sessions reach up to 5000 users per minute at times.
We have one web and one database server. Specs for both machines are as follows:
CPU: 2 x Intel(R) Xeon(R) CPU X5650 @ 2.66GHz
12M Cache / 6 Cores / 12 Threads (x2)
Memory: 24GB
Drive(s)(size/GB) - 4x240gb SSDs RAID 10
We run on Nginx, use FastCGI, and also use APC for caching, along with simple page caching with WP Super Cache.
Current Nginx configuration is as follows:
worker_processes 24;
worker_rlimit_nofile 200000;
worker_connections 4000;
FastCGI settings are as follows:
FcgidMaxProcesses 200
FcgidProcessLifeTime 3600
MaxProcessCount 100
FcgidIOTimeout 400
FcgidIdleTimeout 600
FcgidIdleScanInterval 90
FcgidBusyTimeout 400
FcgidBusyScanInterval 80
ErrorScanInterval 3
ZombieScanInterval 3
Server fails and we get Nginx errors (502-504) during high traffic. I am wondering if this is related to a bad configuration.
Your assistance is much appreciated.
“…it makes sense for us to run multiple workers, usually 1 worker per CPU core. Though, anything above 2-4 workers is overkill as nginx will hit other bottlenecks before the CPU becomes an issue and usually youâll just have idle processes”
Check out this blog: http://blog.martinfjordvald.com/2011/04/optimizing-nginx-for-high-traffic-loads/
This post might be helpful as well: Tuning nginx worker_process to obtain 100k hits per min