Heroku has a hard response timeout of 30 seconds

Heroku has a hard response timeout of 30 seconds, I need that in render too. Because my code might start a infinite loop in rare cases. How can I configure that?
I am using Django ( a python framework )

Hi there,

Thanks for reaching out.

Heroku’s 30 second request timeout only drops the request after 30 seconds, it doesn’t stop the dyno from continuing to process the work. You would still need to detect/stop the long running process yourself.

The same applies to Render. You’d need to detect and stop any long running responses. There’s various ways to do this in each language, e.g.;

  • rack-timeout for Ruby apps
  • Shortening the Gunicorn timeout for Python apps
  • The timeout package for Node apps.
  • etc.

You may also want to think about a different approach to your code if unintended infinite loops are a possibility.

Hope that helps

Alan

https://docs.gunicorn.org/en/latest/settings.html#timeout
In docs it is written that gunicorn have a default timeout of 30 seconds.
So i think i already have timeout enabled