RE: Re: Understanding persistent connections with oci8

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

 



 

-----Original Message-----
From: Richard Lynch [mailto:ceo@xxxxxxxxx] 
Sent: Thursday, October 12, 2006 5:50 PM
To: Bauer, Jay W
Cc: php-general@xxxxxxxxxxxxx; Mendonce, Kiran (STSD); Nikiel, Carsten;
Rai, Moni (GSE WTEC Cupertino); Rieslund, Mikael; Bauer, Jay W
Subject: RE:  Re: Understanding persistent connections with oci8

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?...

jwb> There can be lots of other network traffic on the system and a
socket in use is a socket in use.  It is a jwb> very common complaint
from customers about sockets being open that aren't being used and how
to get rid of jwb> them without killing the application.   That is the
issue that I can see coming up and is the reason our 
jwb> customer in Japan started asking about this timeout option in the
first place. 

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

jwb> I coming to conclusion that this timeout is not going to really act
as a true idle timeout, and the cost of jwb> doing so is too high.  The
need to terminate the unwanted persistent connections is going to need
to be 
jwb> handled a different way.  And there are lots of ways to do it, and
at this point is an open question.



--
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