diff --git a/ecosystem.production.json b/ecosystem.production.json index 035e509..3d78690 100644 --- a/ecosystem.production.json +++ b/ecosystem.production.json @@ -2,7 +2,8 @@ "name": "app", "script": "app.js", "instances": 5, - "cron_restart": "0 */3 * * *" + "cron_restart": "0 */3 * * *", + "max_memory_restart": "200M" }, { "name": "worker", "script": "worker.js", diff --git a/proxy/proxyController.js b/proxy/proxyController.js index 0ecff44..caf5094 100644 --- a/proxy/proxyController.js +++ b/proxy/proxyController.js @@ -186,9 +186,10 @@ const ProxyController = (client, registry) => { resolve() }) - proxy.on('proxyRes', (proxyRes, req, res) => { - proxyRes.headers["x-forwarded-to"] = ctx.state.proxyUrl; - }); + // Causes major memory leak + // proxy.on('proxyRes', (proxyRes, req, res) => { + // proxyRes.headers["x-forwarded-to"] = ctx.state.proxyUrl; + // }); proxy.web(ctx.req, ctx.res, opts, e => { const status = {