Nextjs build command put's app stop for 5s-10s
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
When i want to deploy nextjs app and run the
"post-deploy": "yarn install && yarn build && pm2 reload ecosystem.config.js --env production",
it will build the files correctly but the app is down for 5s-15s then it is building. how to avoid it?
i use
instances: 4,
exec_mode: "cluster",
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the post-deploy command and ecosystem.config.js, then trace how PM2 reload behaves with four cluster instances while the Next.js app is rebuilt. Reproduce the 5–15 second outage and identify a documented or testable deployment path that keeps the app available during the build and reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, node.js
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100