php - Extreme number of open connections between Web and DB server -



php - Extreme number of open connections between Web and DB server -

i run 2 servers, 1 web (nginx/php), 1 database (mysql).

nginx has 1500 active processes per second, , mysql status shows 15 alternative connections on average.

now today started running: netstat -npt | awk '{print $5}' | grep -v "ffff\|127\.0\.0\.1" | awk -f ':' '{print $1}' | sort -n | uniq -c | sort -n

this showed there on 7000 active connections webserver database server ip. seems kind of extreme. not utilize persistent connections in php connect mysql.

i tried using mysql_close() also, seems create no difference.

on webserver netstat shows on 7000 connections database server

on database server netstat shows 300 connections web server

any thought why there many open connections?

try checking established connections only:

netstat -npt | grep established | awk ...

php mysql centos

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -