fastify / fastify/help

Help tracking down delay between calling fastify.close() and plugin receiving onClose

Open
#888 11 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
No language data
Stars
68
Forks
8
Avg merge
11h 2m
Merged PRs (30d)
2

Description

We have a fastify app with multiple custom plugins. When we call `fastify.close()` as part of our shutdown we regularly (but not always) see a ~70 second delay before any of our plugins receive an `onClose` call.

I'm looking for some tips on how I can debug what is causing this delay.

I have tried setting `forceCloseConnections` to `true` to see if this is related to timeout of in-flight requests, but that didn't appear to change anything (and this is seen when developing locally without any requests being sent).

I appreciate there isn't a lot to go on here - mostly looking for tips so I can figure this out, rather than a fully wrapped solution.

## Your Environment

- *node version*: 16
- *fastify version*: 4.17.0
- *os*: Mac

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.