Report this

What is the reason for this report?

App Platform timeout limit?

Posted on December 16, 2021

Hello,

I have a NodeJS web server deployed on DigitalOcean as App (not Droplet). To stress test if DigitalOcean will force timeout (Heroku will force timeout at 30 seconds), I have a route to dynamically delay the response:

app.get("/sleep", async (req, res) => {
  const minutes = parseFloat(req.query.minutes) || 0;
  await sleep(minutes);
  res.json({ status: `I slept for ${minutes} minutes` });
});

A request of 2 minutes returned this error:

<h1>A timeout occurred</h1>
<p>The origin web server timed out responding to this request.</p>

Is it possible to configure a DigitalOcean App to not force timeout?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @ashih,

The timeout error is thrown by Cloudflare and this error occurs if the server was not able to respond within 100 seconds. Cloudflare considers the connection as dead after 100 seconds and terminates it. Unfortunately, we cannot customize or disable the Cloudflare limits. Please optimize the code or switch to a higher plan with more resources to process the request before the timeout limit of 100 seconds is triggered.

Cheers, Ahmed

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.