Replies: 1 comment 1 reply
-
Hi, could you try to set this up in a repository, or stackblitz? The prisma stuff can be removed, just make it fetch uuids from http://httpbin.dev/uuid |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hello,
I'm having an issue with parallel routes deployed on Vercel.
I reproduced the error inside a sandbox project that I will use for explanations.
I use parallel routes on the
parallel
page:src/app/parallel
Here is a screen of what's inside:

Here is the .zip of what's inside:
parallel.zip
Here is the content of

src/app/parallel/layout.tsx
:Here is the content of

src/app/parallel/page.tsx
:Here is the content of

src/app/parallel/StatSelector.tsx
:Here is the content of

src/app/parallel/@user/page.tsx
:loading.tsx
files just contain a component that returns<div>loading</div>
error.tsx
files just contain a component that returns<div>error</div>
(+ "use client")src/app/parallel/@approach/page.tsx
&src/app/parallel/@instance/page.tsx
are similar with console.log &<div>
content adaptedHere is the content of

src/app/parallel/getData.ts
:I don't have any weird behaviors in
yarn dev
oryarn build && yarn start
in local.But when I deploy my app on Vercel,
n
pages are loadedn²
times.As you can see, I added
console.log
inside eachpage.tsx
.When I access


/parallel page
, I have the expected behavior:Every console.log is displayed once.
Now when I access


/parallel?take=15
, I don't have the expected behavior:Each
page.tsx
are loaded 4 times.This is for my sandbox app, but for my "real" app I have more than
30
parallel routes, and when I access the page without seachParams, I also have the issue.I use parallel routes for a stats page
/stats/cityHall
, each parallel route needs 1 db call so the expected behavior should be to have 30 db calls but I currently have 30x30 = 900 db calls (makes my database crash).I can't find what I'm doing wrong. Do you know what didn't I understand ?
Any help would be very much appreciated.
Many thanks in advance !
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions