Comments (8)
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.
This is included in the latest codebase:
https://github.com/zeit/next.js/blob/master/bin/next#L47
from next.js.
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.
@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.
@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.
@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.
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.
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)
- Server component won't re-render when deleting all search params HOT 1
- Server component won't re-render when deleting all search params
- VERCEL_URL doesn't get injected for metadataBase by default (canonical links) HOT 1
- Docs: how to get a copy of page react code before rendering to client side ? HOT 3
- Relative <img> 404s when using next/link and trailingSlash HOT 2
- Triggering notFound in generateMetadata results in Unhandled Runtime Error Error: NEXT_NOT_FOUND
- File name too long (os error 63) since > 14.2 HOT 2
- Docs: Pages and layouts section not opening HOT 5
- Page won't rerender when initial searchparam is removed HOT 1
- Typescript type for router.query is incorrect since it can be undefined (on first render in frontend) HOT 1
- Typescript type for router.query is incorrect since it can be undefined (on first render in frontend) HOT 1
- Routes are broken when the page extension contains only 'tsx'. HOT 2
- Docs: Allow https://nextjs.org/ to work when PerformanceObserver is undefined
- v14.2.x gives warning for `Invalid page configuration` for `middleware.ts` HOT 2
- Dependencies with `exports` field break on pages router with `esmExternals: false`
- Intercepted page in dynamic route with route groups gets called when linked from another segment
- Rewritten paths cause a client side redirect unexpectedly when set up with basePath: false and an active basePath
- SWC does not catch nested `styled-jsx` tags in props HOT 1
- SWC panicks when processing nested `styled-jsx` tags
- Code with a worker fails to build under the edge runtime, even if it's dead code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.