Question

App Platform timeout limit?

Posted December 16, 2021 116 views
Configuration ManagementDigitalOcean App Platform

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?

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.

×
Submit an Answer
1 answer

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