Skip to content

resource leaks in HTTP server and Prisma client shutdown #9611

@EkberHasanov

Description

@EkberHasanov

Have a Keystone on kubernetes as a pod with database connections.
Up the pod and in docker image run npm cms:start which is in package.json scripts/
Send multiple requests to the server
Then delete the pod. I have frontend, nodered and etc.. and I can successfully implement gracefulShutdown function ot them so that they can close DB connections before getting deleted.

When shutting down, Keystone should:
Call server.close() on the HTTP server to allow existing connections to complete
Call prisma.$disconnect() to cleanly shut down the Prisma client
Exit only after all resources are properly closed

I think this info would be irrelevant, but anyway: Dockerfile: FROM node:22-slim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions