Skip to content

Releases: Unitech/pm2

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

1.1.3

25 Apr 18:58
Compare
Choose a tag to compare
  • Adapt code for Node 6.X

1.1.2

14 Apr 09:28
Compare
Choose a tag to compare

Galactica

04 Apr 11:45
Compare
Choose a tag to compare

This release is about PM2's internals refactoring, homogenization in action commands (in terms of behavior and outputs). Some interesting features has been added, as YAML file support (for application declaration) and better support for other languages (Python,Perl...). The Keymetrics agent has been enhanced, dividing by two the memory usage and avoiding any possible leak in any potential scenarios. Reconnection system has been refactored too.

Keymetrics users: a lot of benefits brought to you to do this upgrade

This version has been heavily tested in testing, production environments and deeply monitored in terms of CPU and Memory usage. Tests have been hardened.

  • [#133 #1568] Allow to rename a process via pm2 restart app --name "new-name"
  • [#2002 #1921 #1366] Fix CLI/JSON arguments update on restart (args, node_args, name, max-memory)
  • [#578] Add YAML support for application configuration file (in extent to JSON and JSON5 support)
  • [Keymetrics agent refactoring] TCP wait, memory consumption divided by two, reconnection refactoring, keep alive ping system
  • [Keymetrics agent refactoring] Fix random no response from pm2 link and pm2 unlink
  • [#2061] Kill ESRCH of processes in cluster mode with SIGINT catcher fixed
  • [#2012 #1650 #1743] CLI/JSON arguments update on reload
  • [#1613] Reload all reload ALL applications (stopped, errored...)
  • [#1961] Fix kill timeout info log
  • [#1987] Fix FreeBSD startup script
  • [#2011] Respect process.stdout/.stderr signature
  • [#1602] Fix zombie process when using babel-node as interpreter
  • [#1283] --skip-env option to not merge update with system env
  • Homogeneize actions commands outputs
  • Option --interpreter-args added (alias of node-args)
  • Allow to use exactly the same option in JSON declaration and CLI (e.g. interpreter) to avoid confusion
  • pm2 show, now shows more commands to manage processes
  • Refactor programmatic system

Update procedure

PM2 CLI and internals have been frozen since the 0.14 version, so updating PM2 is totally seamless:

$ npm install pm2 -g
$ pm2 update

Documentation

YAML doc: http://pm2.keymetrics.io/docs/usage/application-declaration/

Redemption

05 Mar 14:00
Compare
Choose a tag to compare

[#1035 #1055] Deactivate automatic dump on startup scripts
[#1980] Add Javascript source map resolution when exceptions occurs Documentation
[#1937] Allow to act on application having numerics as app name
[#1945] Fix post_update commands section when file contains Javascript
[#624] --only to act only on specified app name in json app declaration
0.6.1 PMX upgrade

G minor

13 Feb 16:08
Compare
Choose a tag to compare
  • [#1895] pm2 id : output array of ids for app_name @soyuka
  • [#1800] pm2 show : now also display node.js version @soyuka
  • Fix typos
  • Upgrade moment to secure version and shelljs modules

1.0.0 - Akira

04 Jan 13:13
Compare
Choose a tag to compare

Here we are PM2 1.0 with embedded module system

RT: https://twitter.com/keymetrics_io/status/683999496745922560

  • [#1844][#1845][#1850] Load configuration in /etc/default/pm2 + add ulimit -n override
  • [#1810] Add --kill-timeout option (delay before process receive a final SIGKILL)
  • [#1830] Add tests for PM2_KILL_TIMEOUT (SIGKILL delay) + default SIGINT to any kind of procs
  • [#1825] Process management commands (start/restart/stop/delete) can take multiple arguments
  • [#1822] Add new method pm2.sendDataToProcessId(type|data|id) to send data to processes
  • [#1819] Send SIGINT signal to process instead of SIGTERM
  • [#1819][#1794][#1765] Avoid writing on std err/out when process is disconnected
  • Add default attribute in schema.json to allow to configure default value when passing a JSON
  • JSON and CLI starts are now consistent in terms of option size, attribute number
  • pm2.restart(json_data, function(err, data) now returns an array of process instead of simple object (success:true))
  • Now pm2 restart process.json --env , refresh environment variable on each restart depending of the X environment
  • prepareJSON method in PM2 code (God.js) removed
  • partition Common.prepareAppConf (duplicate with verifyConfs)
  • Change signature of Common.prepareAppConf
  • Centralize Interpreter resolution via Common.sink.resolveInterpreter(app) in Common.js
  • Better meta information when process restart/reload/stop (signal + exit code)
  • Upgrade pm2-axon, cron, should, mocha, coffee-script, chokidar, semver NPM packages
  • Show process configuration option when describing process
  • Add --no-automation flag
  • Fix when starting application with illegal names (#1764)
  • Fix management of app starting with numerics in the filename (#1769)
  • Fix versiong system (reset to default on resurrect/prepare)
  • Increase buffer size for versioning meta parsing

v0.15.9 - Back to the Future

02 Nov 17:49
Compare
Choose a tag to compare
  • Deep JSON declaration args fixed (watch related)
  • Upgrade chokidar / async
  • Windows: Fix process not recycled properly on Windows #1727

v0.15.8 - Nightly Stack

29 Oct 12:43
Compare
Choose a tag to compare
  • New module system backward compatible and compatible with NPM 3.x
  • Possibility to install module from tgz (#1713)
  • ecosystem generated file via pm2 generate uptaded (not json5 prefix anymore, and updated comments)
  • always prefix logs #1695
  • blessed dependency removed
  • drop locking system
  • add callback to deploy (#1673)
  • typo fixes