Uploading large files in Heroku
If you have forms uploading files to the server in Heroku, you may experience problems when file size is larger and internet bandwidth/speed of yours is normal. Heroku has a very small timeout set for operations/(HTTP requests). For heavy operation such as below, Heroku recommends to use background jobs.
- Sending an email
- Accessing a remote API (posting to Facebook, Twitter, querying Flickr, etc.)
- Web scraping / crawling / Web spider operations
- Rendering an image or PDF
- Heavy computation (computing a fibonacci sequence, etc.)
- Heavy database usage (slow or numerous queries, N+1 queries)