Increase Flask Service Timeout Limit

I have a Flask web service that constantly fails because it times out after 30 seconds. This service depends on other APIs, so it is expected some delayed responses sometimes.

Is it possible to increase the timeout limit?

Hi @rafaelquintanilha,

Render doesn’t enforce a timeout at our proxy. I verified this by testing a response that was successful after 40 seconds. It looks like you are using gunicorn in your start command, it is possible that gunicorn is timing out while the app is waiting for the APIs to respond. You could try increasing the timeout in your command with this flag Settings — Gunicorn 20.1.0 documentation and see if that helps.

3 Likes

Thanks, I’ll keep an eye in the next few days but this seems to solve the issue.

2 Likes