Start Keystone with node <filename>.js instead of keystone start
#9607
Unanswered
EkberHasanov
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to implement graceful shutdown in a Keystone CMS running in a kubernetes pod. When a pod receives a SIGTERM signal, I want Keystone to:
Close any open database connections properly
Finish processing current requests
Exit properly
I've tried two approaches:
The first approach consistently runs into memory issues during TypeScript compilation in our container environment. The second approach works but I don't want to do it like that. I wonder if there is a way to get keystone instance and run it in a .js file instead of
keystone start
command as with this approach I can easily handle sent signals.What's the recommended way to handle graceful shutdown with Keystone? Is there a built-in way to ensure database connections are closed when the process receives a termination signals such as
SIGTERM
orSIGKILL
?Beta Was this translation helpful? Give feedback.
All reactions