hypernova icon indicating copy to clipboard operation
hypernova copied to clipboard

Open to adding the ability to restart workers

Open Will-Sommers opened this issue 7 years ago • 5 comments

Hi y'all!

First off, thank you for a really great Github project. We use it here at RTR and its added a lot of rigor around the server-side rendering from our Ruby app.

Onto the issue. Would you be open to a PR which allows the hypernova master process to restart its workers after a specific number of requests. We currently have a job calling SIGTERM on the workers due to memory leaks resulting from our not using createGetComponent.

We have a lot of top level modules and so we opted to not go that route for now and are wondering what your opinion would be on allowing for a hybrid approach, similar to what unicorn-worker-killer does for Ruby.

Thanks again!

Will-Sommers avatar Nov 06 '17 21:11 Will-Sommers

That does seem reasonable to me; although it masks the real problem, it would prevent production problems while it's investigated.

ljharb avatar Nov 06 '17 22:11 ljharb

Cool! One of the things we noticed about running without createGetComponent is that its really helpful for local development because the restarts are really fast. I'm not sure how y'all load components in without restarting the server — perhaps I'm totally missing something.

Will-Sommers avatar Nov 07 '17 00:11 Will-Sommers

@goatslacker, what are your thoughts?

ljharb avatar Nov 07 '17 00:11 ljharb

@ljharb & @goatslacker, I'm going to start off with a PR or perhaps just a hook to be able to send a worker an exit message and will go from there.

Will-Sommers avatar Nov 13 '17 14:11 Will-Sommers

Hey @Will-Sommers. Were you able to make any progress on this? Or care to share a bit about your current setup? Thanks!

jamesmosier avatar Oct 12 '18 18:10 jamesmosier