Closed dougforster-at closed 2 years ago
Hey thanks for writing in!
We use an LRU cache to ensure that we cache calls to readFile
, so it's interesting to see that this still happens.
Perhaps we can add an additional check after the cache is full to check the file descriptor count.
Could you provide a link to your Sentry event or a copy of the event JSON (really we just need the exception object). That will help us start debugging and reproduce a test case!
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
We encountered a problem where:
Sentry.captureException(err, sentryContext);
Result: the linux instance ran out file handles
We pinpointed https://github.com/getsentry/sentry-javascript/blob/8cbcff25235b8d67043820032dba7a9e9cae3a2a/packages/node/src/parsers.ts#L139 as the code that was opening the file handles.
We're interested to advocate for adding caching or enforcing a maximum number of open files, to avoid the risk of exhausting file handles on the host machine.
Thanks!