1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 19:22:42 +01:00

Give all commands from DiffusionCommandEngine a default 15 minute timeout

Summary:
Ref T13108. See PHI364. See the task and issue for discussion.

If a `git fetch` during synchronization hangs, the whole node currently hangs. While the causes of a `git fetch` hang aren't clear, we don't expect synchronization to ever reasonably take more than 15 minutes, so add a default timeout.

Test Plan: Will deploy and observe; this is difficult to reproduce or test directly.

Maniphest Tasks: T13108

Differential Revision: https://secure.phabricator.com/D19235
This commit is contained in:
epriestley 2018-03-15 13:34:34 -07:00
parent 2fa904921e
commit 7e43b74055

View file

@ -135,6 +135,11 @@ abstract class DiffusionCommandEngine extends Phobject {
$future->setEnv($env); $future->setEnv($env);
// See T13108. By default, don't let any cluster command run indefinitely
// to try to avoid cases where `git fetch` hangs for some reason and we're
// left sitting with a held lock forever.
$future->setTimeout(phutil_units('15 minutes in seconds'));
return $future; return $future;
} }