Skip to content

Releases: Unitech/pm2

2.4.2

02 Mar 09:55
Compare
Choose a tag to compare
  • Disable auto install of pm2-server-monit

2.4.1

27 Feb 16:19
Compare
Choose a tag to compare

Potentially breaking changes

All services used by the init-system of your platform will now use the following name : pm2-<user>, take care that if you previously rely on the service name being pm2

  • #2720 multi user startup script

Features

  • #2266 start and tail logs via pm2 start app.js --attach
  • #2706 install pm2 modules via yarn if available
  • [KM] Error reporting: add context (-B3 -A3 code lines)

Fix

  • #2699 add back previous termcaps interface via pm2 imonit
  • #2681 fix log folder create
  • #2724 make sure process is stopped even if there is a restart_delay
  • #2719 show 15 logs line by default
  • #2703 allow custom timestamp with pm2-docker
  • #2698 fix unicode on pm2 monit
  • #2715 handle treekill edge case bug
  • Optimize CPU usage of pm2 monit command

Enchancements

  • [KM] URL web access dashboard
  • [KM] Auto install pm2-server-monit on keymetrics linking
  • [KM] Transaction Tracer: reset routes on app restart / wait some time before sending

2.4.0

06 Feb 15:41
Compare
Choose a tag to compare

2.4.0

  • #2631 new pm2 monit command (blessed dashboard!)
  • #2670 allow to expose a folder over http via pm2 serve <path> <port>
  • #2617 fix startup script generation on macosx (launchd)
  • #2650 new option to append env name to app name (used to allow the same app to be launched in different environement w/o name conflict)
  • #2671 allow to pass a delay to pm2-docker (pm2-docker process.json --delay 10)
  • pm2 ecosystem simple to generate a simple ecosystem file
  • aliasing: pm2-dev <script> <=> pm2-dev start <script>
  • fix git parsing when using cwd
  • #2663 allow to directly output json when logging (via log_type for JSON and --log-type via CLI)
  • #2675 fix path when installing language module like typescript
  • #2674 increase restart timeout for systemd startup
  • #2564 allow to operate process (restart/reload/stop/delete) with regex

2.2.1

14 Dec 14:52
Compare
Choose a tag to compare

New Startup System

New startup system. Supported init system: systemd, upstart, launchd, rcd
Documentation: http://pm2.keymetrics.io/docs/usage/startup/

$ pm2 startup   # Auto detect available init system + Setup init scripts
$ pm2 unstartup # Disable and Remove init scripts

Install PM2 via APT!

New way to install PM2 on Debian based system:

$ wget -O - http://apt.pm2.io/ubuntu/apt.pm2.io.gpg.key | sudo apt-key add -
$ echo "deb http://apt.pm2.io/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/pm2.list
$ sudo apt-get update
$ sudo apt-get install pm2

Responsive PM2 list

Now when PM2 detects a small terminal, the list get shrinked automatically:

responsive

Various fix

  • #1090 pm2 resurrect does not respawn the same processes
  • #2544 Attach logs to exception
  • #2545 Right exit code via pm2 api
  • #2543 Fix module pid/mem monitoring
  • #2537 Remove duplicated code in Configuration subsystem
  • If not TTY do not print ascii table
  • #2509 Trigger functions inside Node.js application from the PM2 CLI
  • Rename pm2.triggerCustomAction() by pm2.trigger(<app_id>, <action_name>, [params], [cb])

2.1.6

28 Nov 12:47
Compare
Choose a tag to compare
  • #2509 Trigger functions inside Node.js application from the PM2 CLI
  • #2474 Resolve home path in configuration file
  • #2526 Expose .launchAll() method to API
  • #2351 inner pm2 actions - drop autorestart and node_args options
  • #2530 Make sure all processes are killed on system signal to PM2
  • #281 allow to combine PM2_SILENT + pm2 jlist to avoid extra data
  • Alias attributes error_file to err_file + err_log + err, alias out_file to out, out_log
  • Do not ask for pass for set/multiset from KM

2.1.5

11 Nov 13:37
Compare
Choose a tag to compare
  • #2502 fix SIGTERM signal catch on pm2-docker
  • #2498 #2500 global log rotation

2.1.4

07 Nov 10:21
Compare
Choose a tag to compare

2.1.4

  • #2333 #2478 #1732 #1346 #1311 #1101 Fix GracefulShutdown SIGINT output + Better Stop process flow
  • Faster CLI load time, reduce load time by 1/4 (downgrade cli-table2 -> cli-table)
  • #2353 --wait-ready will wait that the application sends 'ready' event process.send('ready')
  • #2486 add --web option to pm2-docker command to expose web process api
  • #2425 allow to specify node.js version to be used or installed via interpreter 'node@VERSION'
  • #2471 Make app environment immutable on application restart/reload by default for CLI actions
  • #2451 Config file can be javascript files
  • #2484 fix pm2 kill on windows
  • #2101 pm2 ecosystem now generates a javascript configuration file
  • #2422 allow to pass none to exec_interpreter
  • Do not use disconnect() anymore on cluster processes
  • Better Stop process flow: Upgrade TreeKill system + Wait for check
  • Fix deploy issue with Windows
  • Expose -i to pm2-docker
  • Drop npm-shrinkwrap
  • Upgrade chokidar (fix symlink), cron, fclone, shelljs

v2.0.18

29 Sep 09:13
Compare
Choose a tag to compare
  • #2400 Create log/pid default folder even if the root folder is already created
  • #2395 CRON feature now call PM2 for app to be killed (allow to use SIGINT)
  • #2413 #2405 #2406 do not exit on unhandledRejection auto catch
  • pidusage upgrade to 1.0.8 to avoid util exception on windows when wmic fail
  • Do no display error when pidusage try to monitor an unknow PID (modules)

v2.0.15

21 Sep 16:33
Compare
Choose a tag to compare
  • process.on('unhandledRejection'): allow to catch promise error that have not been catched
  • upgrade fclone and pidusage (faster windows CPU/Mem monitoring)
  • allow to call pm2 CLI from bash script managed by pm2
  • #2394 fix pm2 id command
  • #2385 ts-node upgraded to latest
  • #2381 autocompletion fix

2.0.12 Bradbury

21 Sep 15:16
Compare
Choose a tag to compare
  • Memory usage reduced by 40%
  • CPU usage in overall situations reduced by 60%
  • Refined pm2 logs command with --json, --format and --raw options
  • Faster process management with CONCURRENT_ACTIONs enabled
  • Faster installation (v1: ~30secs, v2: ~10secs)
  • Faster pm2 update with Keymetrics linking delayed at the end
  • Much better Module system with raw NPM feedback
  • Better Windows support
  • pm2-docker command with his official Docker image + json output + auto exit
  • rundev (pm2-dev) command enhanced (better log output, post-exec cmd)
  • Watch and Reload instead of Watch and Restart
  • New PM2 API, backward compatible with previous PM2 versions

The new PM2 API is greatly tested and well designed:

var PM2 = require('pm2');

// Or instanciate a custom PM2 instance

var pm2 = new PM2.custom({
  pm2_home :    // Default is the legacy $USER/.pm2. Now you can override this value
  cwd      :    // Move to CWD,
  daemon_mode : // Should the process stay attached to this application,
  independant : // Create new random instance available for current session
  secret_key  : // Keymetrics secret key
  public_key  : // Keymetrics public key
  machine_name: // Keymetrics instance name
});

// Start an app
pm2.start('myapp.js');

// Start an app with options
pm2.start({
  script   : 'api.js',
  instances: 4
}, function(err, processes) {
});

// Stop all apps
pm2.stop('all');

// Bus system to detect events
pm2.launchBus((err, bus) => {
  bus.on('log:out', (message) => {
    console.log(message);
  });

  bus.on('log:err', (message) => {
    console.log(message);
  });
});

// Connect to different keymetrics bucket
pm2.interact(opts, cb)

// PM2 auto closes connection if no processing is done but manually:

pm2.disconnect(cb) // Close connection with current pm2 instance
pm2.destroy(cb)    // Close and delete all pm2 related files of this session
  • Better CLI/API code structure
  • PM2 isolation for multi PM2 instance management

Bug fixes

  • #2093 #2092 #2059 #1906 #1758 #1696 replace optionnal git module with tgz one
  • #2077 fix calling pm2.restart inside pm2
  • #2261 GRACEFUL_LISTEN_TIMEOUT for app reload configurable via --listen-timeout
  • #2256 fix deploy command for yaml files
  • #2105 alias pm2 logs with pm2 log
  • Extra module display http://pm2.keymetrics.io/docs/advanced/pm2-module-system/#extra-display
  • Yamljs + Chokidar Security fixes
  • pm2 update / pm2 resurrect is now faster on Node > 4.0
  • keymetrics linking after pm2 update is done once all apps are started
  • pm2 list processes are now sorted by name instead id
  • #2248 livescript support added in development mode
  • The client/server file called Satan.js does not exists anymore. It has been replaced by the file combo ./lib/Client.js and ./lib/Daemon.js
  • PM2 --no-daemon is better now

Breaking Change

  • Default Coffeescript support has been dropped you now have to enable it by doing:
$ pm2 install coffeescript