RE: [PHP] Re: Understanding persistent connections with oci8
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Thu, 12 Oct 2006 12:37:17 -0500 (CDT)
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?
.
- Follow-Ups:
- RE: [PHP] Re: Understanding persistent connections with oci8
- From: "Bauer, Jay W"
- RE: [PHP] Re: Understanding persistent connections with oci8
- References:
- RE: [PHP] Re: Understanding persistent connections with oci8
- From: "Bauer, Jay W"
- RE: [PHP] Re: Understanding persistent connections with oci8
- Prev by Date: Re: [PHP] Working with overly aggressive anti-spam measures [SOLVED]
- Next by Date: Re: [PHP] PHP 5 Hosting
- Previous by thread: RE: [PHP] Re: Understanding persistent connections with oci8
- Next by thread: RE: [PHP] Re: Understanding persistent connections with oci8
- Index(es):
Relevant Pages
|