Celtrix icon indicating copy to clipboard operation
Celtrix copied to clipboard

[FEATURE] Close the server and database connection gracefully in the generated API

Open ChandanVarshney031 opened this issue 1 month ago • 2 comments

Description The generated API in apps/api does not appear to handle shutdown signals (please verify), so Ctrl+C or a container stop can leave database connections open.

Proposed solution

  • Handle SIGINT and SIGTERM: stop accepting requests, disconnect Prisma or Mongoose, then exit 0
  • Force exit after a short timeout
  • Cover Express, Hono, Fastify, and the Bun runtime

Acceptance criteria

  • [ ] Stopping npm run dev leaves no open database connections
  • [ ] Exit code is 0 on a clean shutdown
  • [ ] The e2e test checks shutdown

ChandanVarshney031 avatar Oct 31 '26 08:10 ChandanVarshney031

Please assign me !.

pratikadamas avatar Nov 04 '26 15:11 pratikadamas

Hello Pratik Damas, Could you please assign this issue to me? I can work on it and resolve it.

yashbokade22 avatar Nov 18 '26 16:11 yashbokade22