HomePhabricator

Support an explicit connection timeout parameter for database connections

Description

Support an explicit connection timeout parameter for database connections

Summary:
Ref T6238. On the instance management interface, I want to check if an instance's database is reachable by connecting to it.

If it isn't, we hang for 30-60 seconds (default connection timeout). Allow explicit specification of a timeout when establishing a connection instead.

This only does MySQLi, not MySQL. We don't need MySQL for now, although it would be nice to support it eventually (Ref T6710).

Test Plan:

  • Browsed around.
  • Used short timeouts to get instance database status in instance management.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6238, T6710

Differential Revision: https://secure.phabricator.com/D10944