I'm new to nginx and have been migrating my organization's web server away from apache/mod-php and to nginx 1.0 /php-fpm (php 5.3.6)
We use Amazon Web Services and pipe requests to the nginx servers from the AWS load balancers (HAProxy).
On the HAProxy built-in admin stats, I see ~200 current sessions for the server, but I only see ~80 php-fpm processes running (ps -ef, and also checking the php-fpm.log).
Here's what I have configured in....
nginx.conf:
work_processes 8;
worker_connections 1024;
php-fpm.conf:
pm.max_children = 200
pm.start_servers = 10
pm.max_spare_servers = 15
pm.max_requests = 500
Given these #s, I would think that php-fpm should be getting more requests, but I'm not certain if
1) Nginx is a bottleneck due to my configuration (maybe some other settings I'm not aware of)
2) There's an innate latency from AWS to Nginx when proxying incoming requests and out of the nginx/php control.
3) There isn't a direct 1-1 correlation between php-fpm process to request.
I just want to make sure that I'm not introducing a bottleneck due to my configuration and want to make sure we're handling all the requests we should be.
Thoughts?
Thanks in advance.