# Getting timeout on proxy/rewrite requests

**URL:** <https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120>\
**Category:** Support\
**Tags:** redirects\
**Created:** [July 16, 2019, 12:59pm UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120 "2019-07-16T12:59:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![demian](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@demian](https://answers.netlify.com/u/demian)\
**Post date:** [July 16, 2019, 12:59pm UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/1 "2019-07-16T12:59:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [July 18, 2019, 12:42am UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/2 "2019-07-18T00:42:44Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![locrealkey](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/locrealkey/32/2093_2.png) [@locrealkey](https://answers.netlify.com/u/locrealkey)\
**Post date:** [July 30, 2019, 6:57pm UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/3 "2019-07-30T18:57:24Z")

</div>

Just ran into this myself and spent a day trying to figure out if there was a real error in my application somewhere. Thanks for getting the docs updated 🙏🏽

---

<div class="post-metadata">

**Author:** ![Kristen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kristen/32/279_2.png) [@Kristen](https://answers.netlify.com/u/Kristen)\
**Post date:** [October 17, 2019, 10:27pm UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/4 "2019-10-17T22:27:14Z")

</div>

I just wanted to note that this 26 second timeout and the suggested workaround of using an asynchronous request is now covered in our docs under [Rewrites & proxies \> limitations](https://docs.netlify.com/routing/redirects/rewrites-proxies/#limitations). Thanks everyone for this conversation that led to a docs improvement!

---

<div class="post-metadata">

**Author:** ![Laplandia](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/laplandia/32/13129_2.png) [@Laplandia](https://answers.netlify.com/u/Laplandia)\
**Post date:** [July 8, 2020, 11:39am UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/5 "2020-07-08T11:39:38Z")

</div>

Hi. What exactly do you mean by asynchronous call? Making a request with one call and then polling for status? Or something else?

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/scott/32/26136_2.png) [@Scott](https://answers.netlify.com/u/Scott)\
**Post date:** [July 13, 2020, 3:18pm UTC](https://answers.netlify.com/t/getting-timeout-on-proxy-rewrite-requests/2120/6 "2020-07-13T15:18:02Z")

</div>

I think the best definition would be [Amazon’s](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html) 🙂
