nextjs - 💡(How to fix) Fix Duplicated rsc request using route groups and dynamic staleTimes [3 comments, 3 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#86130Fetched 2026-04-08 02:12:26
View on GitHub
Comments
3
Participants
3
Timeline
13
Reactions
2
Author
Timeline (top)
subscribed ×5commented ×3renamed ×2issue_type_added ×1

Code Example

- app/
  - (pages)/
    - 0/
      - page.tsx
    - 1/
      - page.tsx

---

const nextConfig = {
  reactStrictMode: false,
  experimental: {
    staleTimes: {
      dynamic: 60,
    },
  },
}

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.12.0
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: 15.2.0
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/sharp-neumann-7ks2ds

To Reproduce

  1. Start the application in development
  2. Open devtools
  3. Open page /
  4. Click on page 0
  5. Navigate back to /
  6. Click on page 1

Page 0

<img width="381" height="58" alt="Image" src="https://github.com/user-attachments/assets/6c2e95f4-7b99-47a5-beb9-60031276aed3" />

Page 1

<img width="383" height="78" alt="Image" src="https://github.com/user-attachments/assets/03cf55b4-1f4f-4b4a-bde8-1eaf30e31291" />

This only happens when using page groups

- app/
  - (pages)/
    - 0/
      - page.tsx
    - 1/
      - page.tsx

and dynamic staleTimes set to anything non-zero

const nextConfig = {
  reactStrictMode: false,
  experimental: {
    staleTimes: {
      dynamic: 60,
    },
  },
}

Current vs. Expected behavior

Only one server component request is issued.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.12.0
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: 15.2.0
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

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

Route Groups

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

next dev (local), next start (local)

Additional context

This happens in dev and prod, with cacheComponents enabled and disabled, with and without a wrapping suspense boundary.

Setting a debugger on https://github.com/vercel/next.js/blob/f6c2d4913233109ea49256e587db9b7ce636a1a5/packages/next/src/client/components/layout-router.tsx#L401 shows that resolvedRsc really is null for the second request, even though the first request returned just fine.

extent analysis

TL;DR

  • The issue can be potentially resolved by adjusting the staleTimes configuration in nextConfig to better handle dynamic route groups.

Guidance

  • Review the nextConfig and consider setting staleTimes to a lower value or adjusting the caching strategy to improve performance with dynamic route groups.
  • Verify that the resolvedRsc value is not null for subsequent requests by setting a debugger in the layout-router.tsx file.
  • Investigate the impact of cacheComponents and suspense boundaries on the issue, as the problem persists with and without these features.
  • Check the Next.js documentation for any known issues or recommendations related to dynamic route groups and caching.

Example

No specific code example is provided due to the complexity of the issue and the need for further investigation.

Notes

  • The issue affects both development and production environments, with various configurations.
  • The problem is specific to dynamic route groups and may require a tailored solution.

Recommendation

  • Apply workaround: Adjust the staleTimes configuration to optimize performance with dynamic route groups, as this may help mitigate the issue.

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

nextjs - 💡(How to fix) Fix Duplicated rsc request using route groups and dynamic staleTimes [3 comments, 3 participants]