php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #17238 Mysql Connection Timeout
Submitted: 2002-05-15 03:21 UTC Modified: 2002-07-16 09:56 UTC
From: paul79 at optonline dot net Assigned: georg (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 4.2.0 OS: FreeBSd 4.5
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paul79 at optonline dot net
New email:
PHP Version: OS:

 

 [2002-05-15 03:21 UTC] paul79 at optonline dot net
Hey,
    First off, nice work on php.  I must say it's a piece of art.  Well, I was wondering...

I'm trying to build an application that could required mutiple databases.  Obviously, we start off with one database.  As the company gets bigger, and the need for faster access time grows, I was like to split the database records onto mutiple database.  It's kinda like a dynamic database system.  The only problem was, is that when a database is down, and I make a call to mysql_connect(), it hangs, and of coarse, the script timeouts.  I know you can set the timeout limit on the script, but I was wondering if it would be featureful enough to add a timeout limit to the mysql_connect() call.  That way, we can avoid doing a fsockopen() to see if the connection will be ok, before the mysql_connect() call, or even just simply waiting for the mysql_connect() call to return.  With 30 mysql databases to connect to, this is very time consuming, if they were all down.  (If they were all down, at a time, I would be out of a job. -- ;)).  Just a suggestion, in which I think could be very beneficial.  Please let me know what you think.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-16 04:07 UTC] georg@php.net
Yep, that's right. Currently php doesn't support the 
connect_timeout option. I'll implement this.

Georg

 [2002-07-16 09:56 UTC] georg@php.net
With the Version 4.3.0 (current cvs tree) you can set the 
parameter mysql.connect_timeout in your php.ini file.
-1 means no timeout, all other timeout in seconds.

Georg


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 19:01:28 2024 UTC