database connection timeout
| From: | Juffermans, Jos | Date: | Wed, 23 Mar 2005 07:31:05 +0000 |
| Subject: | database connection timeout | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-39014@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to connect to an Oracle database (using ocilogon) which is in a
different country and connected to our serverfarm via a VPN (the database
has no public access). Unfortunately the VPN or the database is not always
available. In those cases I will present the visitor with a page explaining
that the service is unavailable.
My problem is that ocilogon takes a long time to return control if the
connection cannot be established - often even more than 30 seconds. I've
learned that if a connection can be established it'll happen in only a few
seconds (usually within 1 second) and am convinced that if the connection is
not established in eg 5 seconds, there is no point in waiting another eg 30
seconds. How can I tell ocilogon to timeout after eg 5 seconds (like you can
with fsockopen)?
Rgds,
Jos