Skip to content

Commit ddb191f

Browse files
committed
restart self when memory exceed 200MB
1 parent ea80121 commit ddb191f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ build:
3939
@./node_modules/loader/bin/build views .
4040

4141
start: install build
42-
@nohup ./node_modules/.bin/pm2 start app.js -x -i max --name "cnode" >> cnode.log 2>&1 &
42+
@nohup ./node_modules/.bin/pm2 start app.js -x -i max --name "cnode" --max-memory-restart 200 >> cnode.log 2>&1 &
4343

4444
restart: install build
4545
@nohup ./node_modules/.bin/pm2 restart "cnode" >> cnode.log 2>&1 &

0 commit comments

Comments
 (0)