I am using
[login to view URL]
The connection is not high, only 2000,
netstat -an |grep 80 |wc -l
2000.
but the load is super high, it's over 100.
When I restart php_cgi, the load is low, but it goes high slowly.
I notice the cpu usage is low, only 3%. And the memory usage is low as well, only 2G out 12 G.
This is strange. Normally, with nginx+php_cgi, the memory usage is about 90%. The cpu usage is over 50%.
I have server using nginx+php_cgi, it can handle 7000+ connection without an issue, the load is about 10.
The only different is the version of nginx. The one on new server is latest version(nginx/1.4.1), the one I use for other project is nginx/1.0.15.
The other different is the version of centos.
here is the php_cgi config
Quote:
[ "$NETWORKING" = "no" ] && exit 0
spawnfcgi="/usr/bin/spawn-fcgi"
php_cgi="/usr/bin/php-cgi"
prog=$(basename $php_cgi)
server_ip=[login to view URL]
server_port=9000
server_user=nginx
server_group=nginx
server_childs=60
fork_child=3
pidfile="/var/run/[login to view URL]"
# do not edit, put changes in /etc/sysconfig/phpfastcgi
[ -f /etc/sysconfig/phpfastcgi ] && . /etc/sysconfig/phpfastcgi
start() {
[ -x $php_cgi ] || exit 1
[ -x $spawnfcgi ] || exit 2
echo -n $"Starting $prog: "
daemon $spawnfcgi -a ${server_ip} -p ${server_port} -u ${server_user} -g ${server_group} -P ${pidfile} -C ${server_childs} -F ${fork_child} -f ${php_cgi}
retval=$?
echo
return $retval
}
when the server has high load, there is error in the error log
Quote:
*19394689 connect() failed (110: Connection timed out) while connecting to upstream, client: [login to view URL], server:
the server config
Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
memory 12G.