1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +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:
Jakub Vrana 2013-04-05 22:42:27 -07:00
parent b951a38a07
commit 324dd3c0d6

View file

@ -78,8 +78,9 @@ final class PhabricatorGlobalLock extends PhutilLock {
// 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
// connection open indefinitely (or, at least, for a year).
queryfx($conn, 'SET wait_timeout = %d', 365 * 24 * 60 * 60);
// connection open indefinitely (or, at least, for 24 days).
$max_allowed_timeout = 2147483;
queryfx($conn, 'SET wait_timeout = %d', $max_allowed_timeout);
}
$result = queryfx_one(