View Single Post
Old 10-05-2009, 12:00 PM   #1 (permalink)
TheOnly92
The Contributor
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
TheOnly92 is on a distinguished road
Default Flooding MySQL Server

I am using a script to get the status of some particular process every 1.5 seconds. The process may last to about 5 minutes long, which means in this period, 200 requests will be made. 200 requests means the script will be called 200 times. The script being called 200 times will create connection to the database server 200 times. Therefore actually flooding the MySQL server. I wonder if it is appropriate to use persistent connection in this situation because with the connections to MySQL server is closing very slowly (it usually stuck at TIME_WAIT, resulting in almost more than 500 TCP connections open in any given second). Or is there any solutions?
__________________
There are no noobs and pros in this world, only people who know how to use Google and those who don't.
TheOnly92 is offline  
Reply With Quote