Re: Do database resources sleep at night?
| From: | Stephen van Egmond | Date: | Tue, 02 Oct 2001 18:02:21 +0000 |
| Subject: | Re: Do database resources sleep at night? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67098@lists.php.net to get a copy of this message | ||
John Lim (jlim@natsoft.com.my) wrote:
> My suspicion is that persistent resources are only cleaned up when the child
> process dies, while non-persistent resources are closed immediately at the
> end of the page/script. Does anyone know the correct answer?
Correct.
> If you can spare the time, I would be grateful for an answer to the
> following questions too:
>
> 2. If resources are not cleaned up until the apache child process dies, what
> will happen in multi-threaded servers like Apache 2 and IIS?
I don't know. The Right Thing To Do would be to use a connection pool,
with the connection resource "borrowed" by scripts, then released when
they're done. AOLServer does this.
> 3. Are persistent resources locked exclusively by an executing script until
> the script completes when the resources become available for other scripts,
> or can persistent resources be shared by multiple concurrent scripts?
This question doesn't make sense in the current apache architecture.
Each apache child gets its own persistent connections, which are not
shared with other apache children.
-Steve