相关文章推荐

I’m proxying requests to an API server and some requests take quite long. They seem to timeout after 28 seconds and I’m receiving a 500 status code.

I could not find anything in the Netlify docs about this. Also I checked if it was the API server giving the timeout, but directly requesting the API server did not result in a timeout.

Is there any way I can increase this timeout?

Hi Demian,

That timeout cannot be changed. Our system intends to proxy to endpoints that return web content to interactive browsers, and if your web content hasn’t shown up in 26 seconds, it is unlikely that the people in the browser are still waiting. If you’re proxying to trigger something like a long running batch job, I’d be using an asynchronous call rather than proxying.

If your endpoint STARTS sending before 26 seconds (say, HTTP response headers) and the data comes shortly after, that may still work. Aim to have the operation completed in under 60 seconds even then, though.

We’ll add this caveat to the docs, thanks for bringing it up!

 
推荐文章