Skip to content

nitrocode/pm2-bug-update-env-variable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PM2 Bug - Reloading environment variables with zero downtime

Issue #3192

Steps

Install dependencies

npm i

Remove stale logs if there are any

rm -f *.log

Start pm2 with the staging environment

npx pm2 start ecosystem.config.js --env staging

Reload app with zero downtime in a different environment. Also tried restart.

npx pm2 reload all --env production --update-env

Check app-0.log

cat app*.log

You will see

Server running at http://127.0.0.1:8000/
staging
Server running at http://127.0.0.1:8000/
staging

Instead of

Server running at http://127.0.0.1:8000/
staging
Server running at http://127.0.0.1:8000/
production

About

A reproduction of a bug in pm2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published