-
Notifications
You must be signed in to change notification settings - Fork 55
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
Usage With Nodemon #75
Comments
This looks like an interaction with the signal handler used for creating a heapdump. I can reproduce it without appmetrics by running with the heapdump module which appmetrics-dash includes: (simplehttp.js just listens for http connections to keep the node process alive.) Running with an env var which disables signal handling in heap dump seems to improve things for me: I think there's a bit of a clash of signal handlers here. Two modules are using them for different purposes. Does that help at all? I'll investigate a bit more to see if there's anything useful we can do here. |
@hhellyer I'm hitting this now |
I would like to my piece as I am running into the same problem. @hhellyer is correct that there is a signal handling conflict. Nodemon uses SIGUSR2 to handle restarting the app and Appmetrics which uses heapdump as a dependencies uses SIGUSR2 to forcefully create a heapdump snapshot. I don't think in Node you can handle two signals at the same time |
@Aerex - Does setting |
@hhellyer It does fix the problem. Thanks for your insight. Is there another way where appmetrics doesn't use this signal for that will interfere with nodemon. I don't think setting this environment variable should be the permanent solution. |
We would like our node users to be able to use appmetrics and nodemon both and recommending that they set an env var to enable functionality doesn't seem like a good solution, I agree with @Aerex . @hhellyer and @tobespc Can we re-open this discussion and try to find a different solution? My team is considering disabling appmetrics for local development in our tooling in order to enable hot reload with nodemon, which is an unfortunate choice. |
I've notice when used a conjunction with nodemon, a new heap snapshot is written to disk every time the server restarts.
Obviously this would be less of an issue in production, but any thoughts on how to create less file pollution when running in develop mode?
Perhaps dumping the snapshots into some kind of
log
folder instead of the root, or possibly even an option to disable creating the file altogether?The text was updated successfully, but these errors were encountered: