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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.