-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying log path in ecosystem.config.js is not reflected when restarting pm2 #3164
Comments
By default PM2 avoid modifying environment when reloading, you need to pass the flag |
@vmarchaud I tried this command:
It's still logging to the original directory. Is there a good way to step through this? Or if it is an environment variable, is there a way to see it in bash? Here is more of my config if this helps
|
@vmarchaud I ran the following to make it work
Unsure what was causing it to not re-read the updated config file but now it works. I'm wondering if this is caused by running a local version of pm2 instead of a global version... ? |
Hey man, sorry if it's too late: it seems that in order to make changes work, you need to delete the current process running. I figured out it after reading this answer. In my case, it worked after deleting the process/version/app I wanted to update. |
What's going wrong?
My log path doesn't change after modifying
from
to
I tried running
pm2 reload all
and triedpm2 stop all
with a subsequentpm2 ecosystem.config.js --env dev
How could we reproduce this issue?
Use the above from config, run
pm2 start all
and then after it's logging for a bit, change the path to the above to config and runpm2 reload all
and watch as it continues to the log to the original path.Supporting information
The text was updated successfully, but these errors were encountered: