[wp-hackers] Persistent Connections

Nikolay Bachiyski nbachiyski at developer.bg
Sat Aug 20 14:15:57 GMT 2005


Scott Merrill wrote:
> http://wordpress.org/support/topic/42389
> 
> I'm not qualified to definitively answer this question, but I am 
> interested in the issue.
> 
> Why aren't we using persistent database connections?
> 

By default the MySQL server would close an inactive persistent 
connection after about 28800 seconds (8 hours). Of course this value 
could be tuned (wait_timeout and interactive_timeout server variables).
However on most mass-hosting servers this value is not changed.

If we start using persistent connection on servers with high timeouts - 
  not all, but many of the hits on a wordpress page would create a 
brand-new connection to the MySQL server and it will keep it open for 8 
hours! Usually the server can take up to say 100-200 (rarely more than 
500-600) connections at a time (max_connections variable). Probably 
after some clicking the server will start refusing new connections...

IMHO adding an option whether persistent connections are used will be 
useful. Of courseif by default it is 'off' :)

Nikolay.




More information about the wp-hackers mailing list