Re: pconnect and apache processes
| From: | Stig S. Bakken | Date: | Sat, 30 Mar 2002 22:22:27 +0000 |
| Subject: | Re: pconnect and apache processes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1062@lists.php.net to get a copy of this message | ||
On Sat, 2002-03-30 at 18:23, Quinn Comendant wrote:
> Ok, somebody here should know the answer to this one.
>
> I picked up a rumor I'm hoping is not true. I've heard that when an
> apache process opens a pconnect() connection to MySQL, only that specific
> process is able to continue with that connection, and any other processes
> must make a new connection on their own. This is unsettling considering
> the chance for a http request catching the same apache process is 1-out-
> of-1000 for a project I'm working on with multiple load sharing servers.
> I thought that any process could reattain a connection as long as the
> database, username, and password were the same as an already-opened
> connection.
It's not a rumor, it's documented. If you are load-balancing a very
hetrogenous set of requests (with different mysql user names, or maybe
only a fraction php/mysql requests), then you may be better off not
using pconnect. Compared to many other dbs, mysql's connect overhead is
very low.
- Stig