Page MenuHomePhabricator

Support "timeout" in vanilla MySQL connections
Closed, ResolvedPublic

Description

Attached diff supports "timeout" for MySQLi. It would be nice to support this for MySQL, too.

Once MySQL supports it, PhabricatorSetupCheckDatabase should use "timeout" instead of manually setting ini_set('mysql.connect_timeout', 2);. Using an ini_set() dance may also be the only way to get this to work.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

epriestley raised the priority of this task from to Low.
epriestley updated the task description. (Show Details)
epriestley added a project: Infrastructure.
epriestley added a subscriber: epriestley.
epriestley added a revision: Restricted Differential Revision.Dec 8 2014, 1:22 PM
epriestley added a commit: Restricted Diffusion Commit.Dec 8 2014, 7:27 PM

There seems to be no other way than setting the timeout via ini_set().

Ugh. I guess we'd have to this thing, then:

$old = ini_get(...);
ini_set('...', $val);
mysql_connect(...);
ini_set('...', $old);

We need this for T4571 for the cluster status console so it doesn't take 10000 years if replicas are down.

epriestley added a revision: Restricted Differential Revision.Apr 10 2016, 11:02 AM
epriestley added a revision: Restricted Differential Revision.
epriestley added a commit: Restricted Diffusion Commit.Apr 10 2016, 7:17 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Apr 10 2016, 7:19 PM
epriestley added a commit: Restricted Diffusion Commit.