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:10 pm, Bauer, Jay W wrote:
>  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.

Actually, that's an over-simplification of the purpose of "persistent"
and "timeout"

The purpose of "persistent" is to avoid spending CPU cycles tearing
down and building up complex data structures with large buffers, while
maintaining the security/integrity of any given user/pass should have
0 chance of accessing "persisted" (to coin a word) data that is not
their data.

The purpose of "timeout" is to tear down unused expensive connections
if they are not actively being used, or about to be used in 1
microsecond.

Once you understand this, the PHP behaviour makes perfect sense.

It is a very very very common mis-perception, and your customers are
not the first, and won't be the last, to complain that it's broken.

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

Put it in the User Contributed Notes. :-)

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

I have no idea what real world times are, but would never presume that
they'd be hours rather than 10 seconds...

Each active "persistent" connection ties up valuable resources.  The
cost/benefit ratio has to be examined carefully and tweaked under
real-world load in dev box tests to be sure you're doing something
sensible.

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