-
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
PM2 interfering with util.promisify of setTimeout #4199
Comments
It appears it's an upstream issue with |
cc @vmarchaud |
Hey, It should be fixed with a pm2 re-installation:
|
2022 close to end. Problem still exist. Node 18, Ubuntu 22, Telegraf 4.8 for telegram bots. Every day it`s shut down my bots. |
I have the same issue. It only occours using the trace = true option though. Workaround for now is trace = false. Maybe this can hint to a fix? |
What's going wrong?
PM2 is preventing node's
util.promisify
function from properly handlingsetTimeout
. This is a code pattern recommended by the node documentation that allows setting timeouts that flow within promise chains or async functions. Running this code with node outside of pm2 does not result in an error.I am not positive when this issue began, but I know that it did not exist a month ago.
The error received is:
How could we reproduce this issue?
Create a
pm2test.js
with the following:First, run this directly with node:
Now start with pm2:
pm2 start pm2test.js
and observe the log output, which produces the above error.Supporting information
The text was updated successfully, but these errors were encountered: