Add retry loop when trying to establish db connection, log retries
Summary: We retried if a db connection was lost when executing a query, but not when establishing a connection. I've seen a lot of failures establishing connections in our install (they go away when retrying), so this diff retries when establishing connections, and logs when we retry. Test Plan: - Loaded phabricator in a sandbox - Temporarily added a check in the try block to throw if there were still retries (to test logging, retry logic) Reviewers: epriestley, blair Reviewed By: epriestley CC: aran, btrahan Differential Revision: https://secure.phabricator.com/D1460
This commit is contained in:
@@ -117,6 +117,9 @@ return array(
|
||||
// (e.g., db.example.com:1234).
|
||||
'mysql.host' => 'localhost',
|
||||
|
||||
// The number of times to try reconnecting to the MySQL database
|
||||
'mysql.connection-retries' => 3,
|
||||
|
||||
|
||||
// -- Email ----------------------------------------------------------------- //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user