You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically this problem is caused by the behavior when we try to close our HTTP server while clients are opening some keep-alive connections, the server then hangout until all connections are closed, as mentioned on issue nodejs/node-v0.x-archive#9066 and nodejs/node#2642
So before Nest perform callShutdownHook (which will terminate the cron job)
Is there an existing issue for this?
Current behavior
Nestjs won't terminate the program after an API call is done. A cronjob keeps running and
onApplicationShutdown
is not called.Minimum reproduction code
https://github.com/robbielitebit/NestjsShutdownIssue
Steps to reproduce
onApplicationShutdown
is not calledExpected behavior
Expected behavior is that the nestjs application is terminated correctly after terminate signal:
onApplicationShutdown
is calledPackage
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
9.0.0
Packages versions
Node.js version
v16.13.1
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: