RE: Re: Understanding persistent connections with oci8

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

 



Hi Roman,

   As our customers see this, they think if they set a timeout of 10
seconds, that when these connections aren't used for hours they should
go away.  And I can understand that.  As I understand the current
workings, I can see an argument for keeping things as they are, but if
that is the case the current behavior needs to documented.  In a sense
the documentation is the bug.   

 And yes whatever is done will be change in behavior, and it may be a
design change or it might be a fix, it really isn't all that important.
What I like to see is the documentation and behavior match.  They don't
now.

  Regarding there being a way to query the age of the connection, what
was found is that when the timeout occurred there is a easy check that
can be made to see if it has happened.  Currently that is never checked
once the connection is opened.  The "fix" our lab tried was to check if
the timeout happened whenever the an attempt was made to use the open
connection again.  If the timeout had occurred, then the connection was
closed.  It is a passive check, and I think reasonable.  

 Again if someone is using this oci8.persistent_timeout they are using
it because they want a way of controlling how long these connections
stay around.  And given this is a timeout for idle connections, it is
our customer's expectation that these connections will terminate.

  What I see as needed is clear documentation regarding how this timeout
works and what it does and under what circumstances a persistent
connection will terminate when the timeout is set to a time other than
-1, or infinite.  

 I don't see this as a major coding issue, simply one of documentation
and possibly implementing a small change which would actually implement
an action once the timeout occurred.  Obviously this 10 sec timeout
being used is for testing to see the behavior, I would expect that
normally the time, if not -1 and infinite would be more along the line
of hours in the real world. 
  
Thanks and regards, Jay 


-----Original Message-----
From: Roman Neuhauser [mailto:neuhauser@xxxxxxxxxx] 
Sent: Wednesday, October 11, 2006 9:25 PM
To: Bauer, Jay W
Cc: ceo@xxxxxxxxx; 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

# jay.bauer@xxxxxx / 2006-10-11 16:42:06 -0400:
>   And actually, Kiran in our lab proposed that as a very easy fix to 
> implement, and we've tested it and it works fine.  In other words we 
> make 50 persistent connections, with the timeout at 10 seconds, wait a

> minute and then make another round of the same php requests.  With the

> fix we proposed all new php connections are made.  So we know this 
> works.  I think if this was implemented and the documentation was 
> clear that what the persistent timeout provided was for these 
> connections to be shutdown when every a new connection tried to use 
> them, PHP or not, that would go along way to satisfying most 
> customers.  Especially if it clearly and cleanly documented that was
how it worked.

    That's not so much a fix as a different behavior. FWIW the current
    one is perfectly sensible in other circumstances.

    Is there a way to query the age of the connection?

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

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