ID:               39029
 User updated by:  kiranm at hp dot com
 Reported By:      kiranm at hp dot com
 Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: HP-UX
 PHP Version:      5.1.6
 New Comment:

I have not understood why this is not a bug. All the documentation I
read on the topic seems to indicate that the persistent_timeout setting
is the means by which a user can get rid of idle connections. An idle
connection being one that is inactive for a length of time greater than
the persistent_timeout interval specified.

So if I have persistent_timeout set to 10 seconds, any connection that
is open and has not serviced a request for more than 10 seconds is idle
and hence has to be terminated. But this does not happen.

Since this report has been repeatedly closed as bogus, I have opened a
discussion in the PHP user mailing list. If you have any comment,
please do reply. That will help me understand this better.


Previous Comments:
------------------------------------------------------------------------

[2006-10-03 20:47:12] [EMAIL PROTECTED]

>if a connection has been idle for 60 seconds and then a new
>request arrives, this connection ought to be terminated 
>and a new one established.

This doesn't make any sense.
The point in this ini setting is to descrease a number of idle
persistent connections lingering around, it was not supposed to add
more overhead dropping and re-creating connections.
And no, we're not going to change that.
No bug here.

------------------------------------------------------------------------

[2006-10-03 20:26:43] kiranm at hp dot com

>Because only _idle_ connections are supposed to be closed >and this
connection is not idle anymore.

But 60 seconds of inactivity surely exceeds the 10 sec configured for
timeout hence making it an idle connection. So if a connection has been
idle for 60 seconds and then a new request arrives, this connection
ought to be terminated and a new one established. Otherwise, the
documentation needs to be updated with what constitutes 'idle time'.

------------------------------------------------------------------------

[2006-10-03 19:56:54] [EMAIL PROTECTED]

>From the documentation, I understand that the timeout 
>directive is to be used to provide the length of idle time 
>after which the connection will be terminated (if there
>are no active connections).

That's correct.

>So when I use 10 secs as the timeout and issue a request
>after say 60 seconds, shouldnt the existing connection be
>terminated and a new one opened ? That is not happening. 

No, it shouldn't.

>The old one continues to be used no matter what.

Because only _idle_ connections are supposed to be closed and this
connection is not idle anymore.

------------------------------------------------------------------------

[2006-10-03 19:53:11] kiranm at hp dot com

>From the documentation, I understand that the timeout directive is to
be used to provide the length of idle time after which the connection
will be terminated (if there are no active connections).

So when I use 10 secs as the timeout and issue a request after say 60
seconds, shouldnt the existing connection be terminated and a new one
opened ? That is not happening. The old one continues to be used no
matter what.

------------------------------------------------------------------------

[2006-10-03 19:43:35] [EMAIL PROTECTED]

>After the timeout of 10 secs, when I run netstat again, 
>I find all the connections still open.
Sure, they won't just disappear magically.
Connections are closed at extension shutdown, if extension is not used
they will be still there.

>So that part of the code does not get executed
>when there is already an open connection even when the >timeout has
expired.
Yes, that's the whole point (see http://php.net/oci8):
---
oci8.persistent_timeout int

The maximum length of time (in seconds) that a given process is allowed
to maintain an idle persistent connection. Setting this option to -1
means that idle persistent connections will be maintained forever.
---

>I changed it on my machine and it works as expected.
No, persistent connections are NOT expected to be closed if they are
still being used.

No bug here, this is the expected behaviour.


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39029

-- 
Edit this bug report at http://bugs.php.net/?id=39029&edit=1

Reply via email to