Skip to content
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

sampleMemory causing error #70

Closed
testingbot opened this issue Oct 27, 2013 · 5 comments
Closed

sampleMemory causing error #70

testingbot opened this issue Oct 27, 2013 · 5 comments

Comments

@testingbot
Copy link

Installed the plugin yesterday, today I saw this in the log:

18:31:53.36 server.js:207 warn: { [Error: EMFILE, too many open files] errno: 20, code: 'EMFILE', syscall: 'uv_resident_set_memory' }
18:31:53.36 server.js:208 warn: Error: EMFILE, too many open files
at sampleMemory (/home/node/hub/node_modules/newrelic/lib/sampler.js:33:23)
at null. (/home/node/hub/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31)
at wrapper as _onTimeout
at Timer.listOnTimeout as ontimeout

@othiym23
Copy link
Contributor

Hi, TestingBot (if that is your real name)!

I'm not going to close this issue until we get to the root of what's going on here, but this is actually generally a reflection of something wonky going on with your host system and not a cause of it.

If you look at the relevant code in the New Relic module, you'll see that it's just calling process.memoryUsage. This call is failing because the way libuv checks the process's memory is to read a file from the /proc filesystem, and it can't open the file if your system has currently exhausted the number of available file descriptors. You might want to try increasing the number of file descriptors available and seeing if that fixes the problem.

Thanks for the report!

@testingbot
Copy link
Author

Hi othiym23 :)

Thanks for the info, I kind of figured it was a problem on my side. I had already increased file descriptors before, but I guess there's some issue on my side causing this problem.

@othiym23
Copy link
Contributor

I tend to see this problem when the system is either heavily backed up on something or has some kind of open-file leak (with the former being much more common than the latter). If the system where you're running the New Relic module isn't under heavy load, you may want to make sure that files are getting closed out properly when you're done with them. If it is heavily loaded, try doubling the max file descriptors. It's generally only a couple additional megabytes of kernel memory, which should be a tiny chunk of the free memory on your server (unless this is happening on a PaaS like Heroku, in which case you may need to investigate alternative solutions).

@othiym23
Copy link
Contributor

Any reason I shouldn't close this? Were you able to get your file-descriptor issue handled?

@testingbot
Copy link
Author

Yes, please close this issue. Thanks!

cmcadams-newrelic pushed a commit to cmcadams-newrelic/node-newrelic that referenced this issue Jan 29, 2024
…sequelize-app/app/dottie-2.0.4

chore(deps): bump dottie from 2.0.2 to 2.0.4 in /sequelize-app/app
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 11, 2024
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 16, 2024
Check if transaction is null before accessing nameState property
bizob2828 added a commit to bizob2828/node-newrelic that referenced this issue Jul 26, 2024
Adds an additional path to register next-server instrumentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant