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.

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.

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.