mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
Discard stdout/stderr from the aphlict subprocess when running in daemon (normal) mode
Summary: Fixes T11818. We don't discard output, so once we read more than 2GB of output we'll exceed the maximum size of a string in an internal buffer. Instead, configure the future so output is discarded. Test Plan: Added logging to `libphutil/`, saw internal buffer grow steadily before this change and stay constant at 0 after this change. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11818 Differential Revision: https://secure.phabricator.com/D16855
This commit is contained in:
parent
19c6ccb279
commit
7165e4da90
1 changed files with 8 additions and 0 deletions
|
@ -416,6 +416,14 @@ abstract class PhabricatorAphlictManagementWorkflow
|
|||
while (true) {
|
||||
global $g_future;
|
||||
$g_future = new ExecFuture('exec %C', $command);
|
||||
|
||||
// Discard all output the subprocess produces: it writes to the log on
|
||||
// disk, so we don't need to send the output anywhere and can just
|
||||
// throw it away.
|
||||
$g_future
|
||||
->setStdoutSizeLimit(0)
|
||||
->setStderrSizeLimit(0);
|
||||
|
||||
$g_future->resolve();
|
||||
|
||||
// If the server exited, wait a couple of seconds and restart it.
|
||||
|
|
Loading…
Reference in a new issue