I have currently an app deployed on heroku.
It is live since 1 day and I noticed in the logs that users get often an H13 or H28 error on a certain site.
I already found the problem. On this site users are able to upload images (max. 10). I use there 1 Input Field for images where I allow multiselect, so the only way to upload multiple images is doing it at once.
WTForms:
bild = FileField("Weitere Bilder hochladen", validators=[FileAllowed(['jpg', 'png', 'jpeg'], 'Nur Bilder im Formal JPG oder PNG')])
Heroku has a default timeout of 30 seconds if the request is not processed. But the process to upload multiple images is too long and therefore heroku interrupts the process and shows the custom error page.
My Idea:
To solve this I would disable the multiselect and add 9 additonal FileFields in WTForms, so the user has to upload the images one by one, is this the way to go?
Or shall I add a progress bar and increase the timeout, what is the best practise here?
EDIT
Okay I found some solutions, but I would like to use the progress bar and increase the request timeout from heroku.
I will try to upload a new procfile:
web: gunicorn main:app --timeout 120