Jump to content

Apache and persistent connections to MySQL


quiettech

Recommended Posts

Note sure where to put this, but I have a feeling this is the best option considering it is mostly about Apache behavior.

 

I'm trying to better understand the decision to remove persistent connections from the mysqli PHP extension. After reading a few articles on the matter, the general idea seems to be that persistent connections are "evil". This to do mostly with the fact MySQL doesn't provide sound support for this connection type (lacks support for locks and failed transactions, for instance)...

 

Regardless, what I don't understand is persistent connections in the context of Apache child processes. So I need your help.

 

How does Apache connect to MySQL. My understanding so far was that Apache was the owner of this connection and that it was identified as the client. When a web user, regardless of session state, requests a web page that connects to MySQL, if there is a persistent connection in place, they will use that one connection. In short, no matter how many users I have accessing my website, only one connection to mysql exists if I pool all those through mysql_pconnect(). Isn't this so? Why are Apache child processes mentioned over and over again?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.