next.js
next.js copied to clipboard
7 rewrites gives 502: BAD_GATEWAY Code: TOO_MANY_FILESYSTEM_CHECKS
Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000
Binaries:
Node: 18.2.0
npm: 8.9.0
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 12.1.4
react: 18.0.0
react-dom: 18.0.0
warn - Latest canary version not detected, detected: "12.1.4", newest: "12.2.6-canary.5".
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
What browser are you using? (if relevant)
Chrome 104.0.5112.101
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
Our project has 6 rewrites when trying to add a 7th rewrite the deployment succeeds but gives the error "502: BAD_GATEWAY Code: TOO_MANY_FILESYSTEM_CHECKS"
These are supposed to be hostname rewrites to map different hostnames to different pages of the app. It doest say anywhere in vercel about rewrites limits https://vercel.com/docs/concepts/limits/overview
![image](https://user-images.githubusercontent.com/16511084/187057794-4aca9a1e-09a5-4c6f-8190-4bf2dad731a7.png)
This is the most comprehensive discussion on github https://github.com/vercel/next.js/discussions/15793 but I am making this an issue since it seems like a bug
Expected Behavior
Should be allowed to deploy on vercel with more than 6 rewrites
Link to reproduction
https://github.com/cardinal-labs/cardinal-staking-ui/pull/146
To Reproduce
Visit https://cardinal-staking-ui-git-fork-c4sp3r-sol-patch-1-cardinal-labs.vercel.app/ or attempt to deploy this branch on vercel https://github.com/cardinal-labs/cardinal-staking-ui/pull/146
Hey are there any updates on this? been blocked for multiple days now because of this issue
Also seeing this issue on a project I’m working on... Any information or workarounds would be helpful!
Looking forward for an update on this. The limitation seems rather arbitrary and not mentioned anywhere.
Tried with vercel.json but it also doesn't work. But this works https://github.com/vercel/next.js/issues/26487
return {
beforeFiles: [
This thread is old but the issue remains. Is there an update?
I skirted the issue via the re-ordering the rewrites— the noted beforeFiles
approach— and that has held up, if cumbersome.
Any word on this all, any change in the policy? I’d like to NOT test that this still exists in a prod env.
We've made improvements to this recently so this should no longer be an issue.
If you're still coming across this, let us know!
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.