Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 1c8f4f9

Browse files
authored
Use env variable to set max memory limit and instance number (#32)
Max memory limit could be different based on the lambda resolver and sometimes it needs more memory so we should be able to set this via a environment variable. The same is true for number of instances that PM2 creates.
1 parent f3bb346 commit 1c8f4f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ecosystem.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module.exports = {
33
{
44
name: "dgraph-lambda",
55
script: "./dist/index.js",
6-
instances: 4,
6+
instances: Number(process.env.INSTANCES || 4),
77
exp_backoff_restart_delay: 100,
8-
max_memory_restart: "64M",
8+
max_memory_restart: process.env.MAX_MEMORY_LIMIT || "64M",
99
watch: ["./script/script.js"],
1010
watch_options: {
1111
followSymlinks: false,

0 commit comments

Comments
 (0)