nextjs - 💡(How to fix) Fix reactMaxHeadersLength doesn't seem to work [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86208Fetched 2026-04-08 02:11:59
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:32:41 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 8
Binaries:
  Node: 20.19.5
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.5.2
Relevant Packages:
  next: 15.5.6 // An outdated version detected (latest is 16.0.3), upgrade is highly recommended!
  eslint-config-next: 15.4.7
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.9.3
Next.js Config:
  output: N/A
An outdated version detected (latest is 16.0.3), upgrade is highly recommended!
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/lianulloa/431

To Reproduce

  1. set reactMaxHeadersLength to 100_000_000 (or any other big number)
  2. run the app
  3. go to any route including a query token like auth_token. The value of the query params is quite long (7830 characters)

the final request end up being around 19000 characters

Current vs. Expected behavior

Current: Browsers (both Chrome and Firefox) return ERR_HTTP_RESPONSE_CODE_FAILURE 431 (Request Header Fields Too Large)

Expected: Request goes through

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:32:41 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 8
Binaries:
  Node: 20.19.5
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.5.2
Relevant Packages:
  next: 15.5.6 // An outdated version detected (latest is 16.0.3), upgrade is highly recommended!
  eslint-config-next: 15.4.7
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.9.3
Next.js Config:
  output: N/A
 ⚠ An outdated version detected (latest is 16.0.3), upgrade is highly recommended!

Which area(s) are affected? (Select all that apply)

Connection, Headers, React

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

we are wrapping

extent analysis

TL;DR

  • The issue can likely be resolved by upgrading Next.js to the latest version, which may include fixes for handling large request headers.

Guidance

  • Verify that the issue persists with the latest version of Next.js (16.0.3) to ensure it's not already fixed.
  • Check if reducing the reactMaxHeadersLength value or optimizing the query token length can temporarily mitigate the issue.
  • Investigate if there are any browser-specific limitations or configurations that could be contributing to the ERR_HTTP_RESPONSE_CODE_FAILURE 431 error.
  • Review the Next.js documentation and release notes for any changes related to header handling or query parameter limits.

Example

No specific code snippet is provided as the issue seems related to configuration and versioning rather than a specific code error.

Notes

The provided environment information indicates an outdated version of Next.js, which might be the primary cause of the issue. Upgrading to the latest version is highly recommended, but it's also important to test and verify the fix.

Recommendation

  • Upgrade to the fixed version: The latest version of Next.js (16.0.3) should be used to potentially resolve the issue, as indicated by the environment information warning about an outdated version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING