mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
Reduce wait_timeout to max. allowed value
Summary: http://dev.mysql.com/doc/mysql/en/server-system-variables.html#sysvar_wait_timeout Test Plan: $ arc unit Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5590
This commit is contained in:
parent
b951a38a07
commit
324dd3c0d6
1 changed files with 3 additions and 2 deletions
|
@ -78,8 +78,9 @@ final class PhabricatorGlobalLock extends PhutilLock {
|
||||||
|
|
||||||
// NOTE: Since MySQL will disconnect us if we're idle for too long, we set
|
// NOTE: Since MySQL will disconnect us if we're idle for too long, we set
|
||||||
// the wait_timeout to an enormous value, to allow us to hold the
|
// the wait_timeout to an enormous value, to allow us to hold the
|
||||||
// connection open indefinitely (or, at least, for a year).
|
// connection open indefinitely (or, at least, for 24 days).
|
||||||
queryfx($conn, 'SET wait_timeout = %d', 365 * 24 * 60 * 60);
|
$max_allowed_timeout = 2147483;
|
||||||
|
queryfx($conn, 'SET wait_timeout = %d', $max_allowed_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = queryfx_one(
|
$result = queryfx_one(
|
||||||
|
|
Loading…
Reference in a new issue