I understand the performance boost one can get by reusing existing connections. And I did see for myself that with the default settings, oci_pconnect() does reuse all the connections. But what should happen if there are idle connections and the timeout is reached ? That is my question. What is the purpose of the persistent_timeout setting ? Does it give the user a means of specifying a timeout after which idle connections are removed ? -----Original Message----- From: Manuel Lemos [mailto:mlemos@xxxxxxx] Sent: Wednesday, October 04, 2006 12:16 AM To: php-general@xxxxxxxxxxxxx Subject: Re: Understanding persistent connections with oci8 Hello, on 10/03/2006 07:03 PM Mendonce, Kiran (STSD) said the following: > This is a follow up to the bug (#39029) that I reported earlier which > has been repeatedly closed as bogus. > > The oci8.persistent_timeout setting in the php.ini file is documented > as > : > "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. " > > If I do not want the connection to be persist forever, then by using > this setting, I should be able to ensure that a connection is not idle > for longer than what I specified. However, when I set > persistent_timeout to 10 seconds, I find that the connection is not > terminated even after 10 seconds have passed. In fact, it doesn't > terminate at all. So the question is what is the purpose of this > setting ? And what does an 'idle connection' mean ? A google query for > 'idle timeout' yields enough results to point that when the timeout > occurs, the idle connection is terminated. > > Obviously there is a bug somewhere. Either in the documentation or in > the behavior. Please advise. I think that there is no bug and that option is useless. If you are using Apache, it will rotate the processes that serve each request. So, unless your server is mostly idle or your scripts rarely access the database, your connections will keep being reused before reaching that timeout. If you are willing to reduce the number of persistent Oracle connections, you will most likely get better results if you move your site images to a separate Web server. Image requests do not establish Oracle connections, but they raise the need for Apache to fork more processes, which leads to more opened persistent connections. Here you may find more details about that strategy: http://www.meta-language.net/metabase-faq.html#excessive-connections -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php