Question

App Platform timeout limit?

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?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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