7

I'm learning Django and have an app hosted in Heroku.

The app takes an Excel file from Amazon S3 that contains products to be synced with a database (Postgre).

When I had around 400 products in the file, the app worked perfectly. Now I have around 1100 products and as the sync process is taking more than 30 seconds, Heroku is returning me this error:

code=H12 desc="Request timeout"

I already raised the Gunicorn timeout to from 30 seconds to 600 seconds, but still receiving the error.

Based on what I've been reading the timeout is associated with Heroku and not with Gunicorn.

I'm using 1 web dyno (the free one) should I increment dynos? or that wouldn't solve the problem?

Thanks a lot,

Eduardo

3 Answers 3

1

i guess the error come from your web server (nginx, apache...) You should try to increase the default timer for a timeout (if you can) or launch your sync in a async way

0

This is by design according to Heroku here. They suggest opening a WebSocket, though that often won't make sense...

-1

According to the Heroku docs, the 30 second limit is strict, and cannot be overridden by local Gunicorn settings.

1
  • 3
    Actually, I think this is technically correct. However, it might be good to finish the answer and explain what to do instead. Nov 25, 2016 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.