Fastify under-pressure how to find out which routes are reasons
- Dominant language
- No language data
- Stars
- 68
- Forks
- 8
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 2
Description
Do we have a way to find out which routes are the problem?
```ts
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.
Contributor guide
Assessment
This issue has not been assessed yet.