Homec4science

Add retry loop when trying to establish db connection, log retries

Authored by Nick Harper <nharper@fb.com> on Jan 20 2012, 00:04.

Description

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

Details

Committed
Nick Harper <nharper@fb.com>Jan 20 2012, 22:56
Pushed
aubortJan 31 2017, 17:16
Parents
rPH27f52efd37ee: Minor, fix spelling issues detected by linter.
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Harper <nharper@fb.com> committed rPHd5eaef956709: Add retry loop when trying to establish db connection, log retries (authored by Nick Harper <nharper@fb.com>).Jan 20 2012, 22:56