You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pm2 sendSignal SIGUSR2 my-app # Send system signal to script
145
145
$ pm2 start app.js --no-daemon
146
+
$ pm2 start app.js --no-vizion
147
+
$ pm2 start app.js --no-autorestart
146
148
```
147
149
148
150
## Different ways to launch a process
@@ -227,6 +229,8 @@ Options:
227
229
--ignore-watch <folders|files> folder/files to be ignored watching, chould be a specific name or regex - e.g. --ignore-watch="test node_modules "some scripts""
228
230
--node-args <node_args> space delimited arguments to pass to node in cluster mode - e.g. --node-args="--debug=7001 --trace-deprecation"
229
231
--no-color skip colors
232
+
--no-vizion skip vizion features (versioning control)
233
+
--no-autorestart do not automatically restart apps
230
234
```
231
235
232
236
@@ -319,8 +323,8 @@ JSON:
319
323
320
324
Units can be K(ilobyte), M(egabyte), G(igabyte).
321
325
322
-
>
323
-
Actually the way it works when you type :
326
+
327
+
Actually the way it works when you type:
324
328
`pm2 start app.js --max-memory-restart 50M`
325
329
commander module will transform it to `maxMemoryRestart: "50M"`, then after being processed by PM2 logic it will become an env variable as follows `max_memory_restart : 52428800 // in bytes this time`.
326
330
But since programmatic interface doesn't use commander you have to give it raw-mode : `maxMemoryRestart`.
@@ -380,6 +384,12 @@ You can also reload all logs via the command line with:
380
384
$ pm2 reloadLogs
381
385
```
382
386
387
+
### Manually triggering garbage collection for PM2
388
+
389
+
```bash
390
+
$ pm2 gc
391
+
```
392
+
383
393
### Options
384
394
385
395
```bash
@@ -638,6 +648,8 @@ You can define parameters for your apps in `processes.json`:
.option('--ignore-watch <folders|files>','folder/files to be ignored watching, chould be a specific name or regex - e.g. --ignore-watch="test node_modules \"some scripts\""')
45
45
.option('--node-args <node_args>','space delimited arguments to pass to node in cluster mode - e.g. --node-args="--debug=7001 --trace-deprecation"')
46
46
.option('--no-color','skip colors')
47
+
.option('--no-vizion','start an app without vizion feature (versioning control)')
48
+
.option('--no-autorestart','start an app without automatic restart')
49
+
47
50
.usage('[cmd] app');
48
51
49
52
commander.on('--help',function(){
50
53
console.log(' Basic Examples:');
51
54
console.log('');
52
55
console.log(' Start an app using all CPUs available + set a name :');
53
-
console.log(' $ pm2 start app.js -i max --name "api"');
Copy file name to clipboardExpand all lines: doc/PULL.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ or to the optional specified commit ID.
36
36
37
37
Everytime a backward/pull/forward command is executed, pm2 checks in ecosystem.json, process.json and package.json (in that order) for commands to run (e.g. npm install).
38
38
The field should be named post_update and should be an array of commands.
39
+
You can also set the timeout for exec() command with 'exec_timeout' field (in ms).
40
+
By default it is 60000 (60sec).
39
41
Your file should look something like this :
40
42
41
43
```json
@@ -50,7 +52,8 @@ Your file should look something like this :
50
52
"script" : "app.js",
51
53
"post_update" : ["echo App has been updated, running npm install...",
0 commit comments