Django app working time out time in Heroku

I am learning Django and have an application hosted in Heroku.

The application accepts an Excel file from Amazon S3, which contains products that will be synchronized with the database (Postgre).

When I had about 400 products in a file, the application worked perfectly. Now I have about 1100 products, and since the synchronization process takes more than 30 seconds, Heroku returns this error to me:

code = H12 desc = "Request timeout"

I have already increased the Gunicorn timeout to 30 seconds to 600 seconds, but still get the error.

Based on what I read, the timeout is related to Heroku, not Gunicorn.

Do I use 1 web dino (free) if I have to increase the number of speakers? or does this not solve the problem?

Thank you very much,

Eduardo

+6
source share
2 answers

I assume that the error comes from your web server (nginx, apache ...) You should try to increase the default timer for a timeout (if you can) or start synchronization using the asynchronous method.

+1
source

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

0
source

Source: https://habr.com/ru/post/959491/


All Articles