Open
Description
Do we have a way to find out which routes are the problem?
fastify.register(underPressure, {
maxEventLoopDelay: 1000,
exposeStatusRoute: true,
pressureHandler: (req, rep, type, value) => {
if (type === underPressure.TYPE_HEAP_USED_BYTES) {
fastify.log.warn(`too many heap bytes used: ${value}`)
} else if (type === underPressure.TYPE_RSS_BYTES) {
fastify.log.warn(`too many rss bytes used: ${value}`)
} else if (type == underPressure.TYPE_EVENT_LOOP_DELAY) {
fastify.log.warn(`reached max even loop delay: ${value}`)
fastify.Sentry.captureMessage('reached max even loop delay');
}
rep.send('out of memory') // if you omit this line, the request will be handled normally
}
})
Please give me a tip/guide. I don't know how to do it.