Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit deab057

Browse files
diry quick fix for 100% CPU issues
1 parent ed323df commit deab057

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ ENV NODE_ENV=production
1616
ENV API_PORT=3030
1717

1818
# start the application in a autohealing cluster
19-
CMD NODE_ENV=production pm2 start server/index.js -n api --attach
19+
# NOTE: quick fix for server issues, restart api when reaching max of 300 MB Memory Usage (happens in conjunction with 100% CPU Usage)
20+
# TODO: find better way of dealing with that issue
21+
CMD NODE_ENV=production pm2 start server/index.js -n api --attach --max-memory-restart 300M
2022
# CMD NODE_ENV=production pm2 start server/index.js -n api -i 2 --attach
2123
# as we have issues with pm2 currently in conjunction with nuxt, we use the standard approach here
2224
# CMD NODE_ENV=production node server/index.js

0 commit comments

Comments
 (0)