I'm preparing chat system with comet style programming.It delays(sleeps) page for a 60 second and I use mysql queries in this loop and it approximately sends 245.000 queries to mysql. Mysql status is like below:
Aborted_connects - 179391
Connections - 15673040
Max_used_connections - 59
Threads_connected - 6
May it be problem that Connections tab is 15 million, but I can't kill them. Can I solve this problem adding mysql_close
to end of while()
?
set_time_limit(60);
mysql_connect("...");
while(true){
usleep(60000);
clearstatcache();
mysql_query("...");
mysql_close();//<= this one
}