[next.config.js] rewrites be able to change the proxyTimeout #36598
Replies: 6 comments 12 replies
-
Keeping this active. We really need this feature. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know if we will see this feature added soon? We have a use case where an executable can only be downloaded if a JWT is authorized and verified thus we cant use a S3 bucket or equivalent and it needs to go through an API. If we use the next API it yells at us over the request size saying its too big, if we use the rewrites feature it times out and throws a socket hangup. We really can't win with our current options so this feature would help a lot... |
Beta Was this translation helpful? Give feedback.
-
This feature already added. You can use an experimental option proxyTimeout. Pull request #40289. |
Beta Was this translation helpful? Give feedback.
-
proxyTimeout is a really important feature when my proxy API gets a long time to respond |
Beta Was this translation helpful? Give feedback.
-
Just type proxyTimeout: in your vsCode search and make sure you're searching in node_module and change :) |
Beta Was this translation helpful? Give feedback.
-
Vercel currently limits proxy requests to 30 seconds.
So until this limit is changed, the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature you'd like to request
I am creating a site in Next.JS and my server in Express and I am doing rewrite inside
next.config.js
pointing to my server.But there's a problem, I can't make a request to my server and the response takes longer than
30 seconds
, because the following error appears:Error: Socket hang up
Also happens if I am using for example Socket.IO, where this error appears in the console.
Describe the solution you'd like
Checking where the possible problem is, I realized it is on this lines:
next.js/packages/next/server/next-server.ts
Lines 486 to 492 in 0de109b
where
proxyTimeout
is being limited to30 seconds
.Thinking about a solution, I believe it should be possible to configure
proxyTimeout
.Related issues:
#36251
Related discussions:
#24805
Describe alternatives you've considered
N/A
Beta Was this translation helpful? Give feedback.
All reactions