NYCPHP Meetup

NYPHP.org

[nycphp-talk] When to close a mysql connection

David Krings ramons at gmx.net
Sat Jun 30 11:06:34 EDT 2007


Jakob Buchgraber wrote:
  > No mysql doesn't hold many connections then as there is only one
> connection at all when using persistent connections.
> 
Well, yes, but I assume one per client. So if I'd set the timeout to be 
x hours then it might just be quite easy to pile up a few hundred of 
unused connections. And that even with only a few concurrent connections 
at a time. Playing devil's advocate here.

I think that this might be less an issue when setting the timeout 
reasonably, such as 30 minutes. Much better to reconnect once every half 
hour (if that) then for every script call. Is that how it works?

David



More information about the talk mailing list