[Solved]-CSV export in Stream (from Django admin on Heroku)

10👍

I found the solution to the problem. It’s not a Heroku timeout because otherwise there would be a H12 timeout in the Heroku log (thanks to Caio of Heroku to point that out).

The problem was the default timeout of Gunicorn wich is 30 seconds. After adding –timeout 600 to the Procfile (at the line of Gunicorn) the problem was gone.

The Procfile now looks like this:

web: gunicorn myapp.wsgi -b 0.0.0.0:$PORT --timeout 600
celeryd: python manage.py celeryd -E -B --loglevel=INFO
👤Tom

1👍

That’s rather not the problem of your script, but the problem of 30 seconds web request default Heroku timeout.
You could read this:
https://devcenter.heroku.com/articles/request-timeout
and according to this doc – move your CSV export to background process.

Leave a comment