Page MenuHomePhabricator

D15720.id37879.diff
No OneTemporary

D15720.id37879.diff

diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
--- a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
+++ b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
@@ -78,6 +78,7 @@
'logs' => 'optional list<wild>',
'cluster' => 'optional list<wild>',
'pidfile' => 'string',
+ 'memory.hint' => 'optional int',
));
} catch (Exception $ex) {
throw new PhutilArgumentUsageException(
@@ -508,10 +509,22 @@
return $root.'/support/aphlict/server/aphlict_server.js';
}
+ private function getNodeArgv() {
+ $argv = array();
+
+ $hint = idx($this->configData, 'memory.hint');
+ $hint = nonempty($hint, 256);
+
+ $argv[] = sprintf('--max-old-space-size=%d', $hint);
+
+ return $argv;
+ }
+
private function getStartCommand(array $server_argv) {
return csprintf(
- '%s %s %Ls',
+ '%R %Ls -- %s %Ls',
$this->getNodeBinary(),
+ $this->getNodeArgv(),
$this->getAphlictScriptPath(),
$server_argv);
}
diff --git a/src/docs/user/configuration/notifications.diviner b/src/docs/user/configuration/notifications.diviner
--- a/src/docs/user/configuration/notifications.diviner
+++ b/src/docs/user/configuration/notifications.diviner
@@ -80,6 +80,9 @@
- `cluster`: //Optional list.// A list of cluster peers. This is an advanced
feature.
- `pidfile`: //Required string.// Path to a PID file.
+ - `memory.hint`: //Optional int.// Suggestion to `node` about how much
+ memory to use, via `--max-old-stack-size`. In most cases, this can be
+ left unspecified.
Each server in the `servers` list should be an object with these keys:

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 4, 8:10 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712710
Default Alt Text
D15720.id37879.diff (1 KB)

Event Timeline