RE: Re: Understanding persistent connections with oci8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, October 12, 2006 12:52 pm, Bauer, Jay W wrote:
>   Under the current situation these won't go away, unless there is a
> lot
> of other traffic for the webserver and the httpd servers need to free
> up
> these idle connections to handle other requests.

But if there's no traffic, then does it really matter if the idle
connections are sitting around?...

>   Given something along these lines in a more real world setup, what
> makes sense?   Given this scenario, if there is going to be a timeout,
> it almost needs to be an active one.  And something simple along the
> lines of garbage collector that checks once an hour for  connections
> that have gone and terminates them.  But that requires more code in
> PHP.

Not just "more code"

LOTS more code, and very complicated.

It's got to be inter-process aware, it's got to "wake up" some kind of
assassin daemon, it's got to not consume hardly any resources, ...

The only "need" demonstrated for an active GC is the incorrect
perception that PHP "should" work that way.

It just doesn't.

Demonstrate a real need for the resources to be freed up when they
aren't.

Or provide a cheap and easy patch to free them up.

Or, write a cron job to get a 0-byte file and uses ab to tickle enough
of the Apache children that the connections go away, and tell your
customer that you fixed it. :-)

Actually, here's an even more attractive option:
Set up httpd.conf such that the Apache children are dying off soon
enough and fast enough after being idle, that THEY release the
connection.  Not to mention that they'll free up whatever resources
the dormant Apache children are using.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux