Code Monkey home page Code Monkey logo

Comments (8)

CpuID avatar CpuID commented on April 28, 2024 5

I would argue graceful shutdown is still a relevant feature here, especially for rolling deployments where you don't want to kill in-flight requests.

from next.js.

timneutkens avatar timneutkens commented on April 28, 2024

This is included in the latest codebase:
https://github.com/zeit/next.js/blob/master/bin/next#L47

from next.js.

Twipped avatar Twipped commented on April 28, 2024

The code you referenced does not appear to be a graceful shutdown, it's just reacting to the termination of the subprocess?

from next.js.

arunoda avatar arunoda commented on April 28, 2024

@ChiperSoft I don't like graceful shutdown at all since server don't shutdown gracefully specially in this cloud era.

But anyway, Next.js should not have databases and stateful things (That's what we recommend).
So, it's totally okay to kill it right away.

About integration testing, you don't need that too. Check our testing suite and how we do it. You don't need graceful shutdown.

from next.js.

Twipped avatar Twipped commented on April 28, 2024

@arunoda you should still be waiting for requests to complete before killing the process. a deploy will hang up on anything in flight.

from next.js.

arunoda avatar arunoda commented on April 28, 2024

@ChiperSoft better option is to do that with a proxy. (with re-trying)
Most of the proxies does support that. And most of the cloud hosting servers.

Servers could fail at sudden.

from next.js.

nkzawa avatar nkzawa commented on April 28, 2024

I think it's nice to have graceful shutdown for programatic API, even though it's not must. Maybe there is no downside to implement ?

from next.js.

mraxus avatar mraxus commented on April 28, 2024

Are there any plans on opening this issue up again? I have the same problem like @ChiperSoft was having: integration tests. I'm not sure how to shutdown the server.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.