Re: passing db persistent connections through different pages
| From: | boltthrower at libero dot it | Date: | Fri, 22 Jun 2001 11:05:31 +0000 |
| Subject: | Re: passing db persistent connections through different pages | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9730@lists.php.net to get a copy of this message | ||
On Thu, 21 June 2001, "Christopher Ostmo" wrote:
> The persistence of the DB connection follows the child process that
> serves your individual web page request. The first time a child process
> requests a persistent DB connection, it will maintain that connection
> until the child process dies. The problem is that when you are on a web
> site, when you request a page, the page is served and you disconnect
> from the child process. The next request to the same site will use one
> of the other open child processes - not necessarily (and probably not
> usually) the same one. The default configuration of Apache is to keep
> 10 spare child processes running at all times. On busy and semi-busy
> servers, child processes are created and destroyed regularly. Once the
> child process is destroyed, the database connection is destroyed with it.
>
> The bright side is that the connections are actually persistent, which
> means that you will in fact benefit. The down side is that you are not
> going to always get the same persistent connection for each request.
> Doing so would probably not be possible over a stateless connection
> (as HTTP connections are).
>
>
> http://www.php.net/manual/en/features.persistent-connections.php
> Explains this in pretty good detail.
>
thank you very much, Christopher, I had just submitted a bug (http://bugs.php.net/?id=11614) when I
understood what you said (the key words are "you are not going to always get THE SAME
persistent connection")
bye,
--Giuse
http://boltthrower.webhop.org
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com