Homec4science

Support an explicit connection timeout parameter for database connections

Authored by epriestley <git@epriestley.com> on Dec 8 2014, 20:27.

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

Details

Committed
epriestley <git@epriestley.com>Dec 8 2014, 20:27
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUdd243f1298de: Minor linter fix
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU3d31d3874f1b: Support an explicit connection timeout parameter for database connections (authored by epriestley <git@epriestley.com>).Dec 8 2014, 20:27