Page MenuHomePhabricator

Support "timeout" parameter in older MySQL connections
ClosedPublic

Authored by epriestley on Apr 10 2016, 11:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 12, 6:45 AM
Unknown Object (File)
Mon, Aug 8, 5:49 AM
Unknown Object (File)
Mon, Aug 8, 2:34 AM
Unknown Object (File)
Sun, Jul 24, 6:46 AM
Unknown Object (File)
Jun 26 2022, 11:26 AM
Unknown Object (File)
Jun 25 2022, 11:46 AM
Unknown Object (File)
Jun 24 2022, 3:07 AM
Unknown Object (File)
Jun 18 2022, 6:45 AM
Subscribers
None

Details

Summary

Ref T6710. We have two connectors: "MySQL" and "MySQLi". The latter one ("i = improved") has had straightforward support for connection timeouts for 15 months, since it just takes a parameter.

The un-improved connector needs to take a more roundabout route.

Also, improve the exception we throw when a client gets an error because they're missing a permission. This arises when you SHOW SLAVE STATUS from a client without permission to do that, for example.

The next change will update Phabricator to use this parameter properly.

Test Plan

After next change, specified a bad database and forced thee connector to use MySQL. Forced timeout to 1 second. Reloaded page, saw an error in a few seconds instead of a few minutes.

(We are still much slower than we should be about detecting this condition and marking a host as bad, but that will come in the future.)

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support "timeout" parameter in older MySQL connections.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 10 2016, 3:04 PM