| TheOnly92 |
10-05-2009 12:00 PM |
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?
|