Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Worker timeout Django app in Heroku

Tags:

django

heroku

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

like image 819
Ed Taya Avatar asked Dec 06 '13 16:12

Ed Taya


1 Answers

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

like image 129
Lujeni Avatar answered Oct 06 '22 00:10

Lujeni