H12 – Request timeout
Error code H12 indicates the app took over 30 seconds to respond to the Heroku router. Solution: Code that requires more than 30 seconds must run asynchronously (e.g., as a background job) in Heroku. For more info read Request Timeout in the Heroku DevCenter.
How do I fix request timeout on heroku?
This problem can be ameliorated by the following techniques, in order of typical effectiveness:
- Run more processes per dyno, with correspondingly fewer dynos. ...
- Make slow requests faster by optimizing app code. ...
- Run more dynos, thus increasing total concurrency.
How do I increase my heroku request timeout?
upload the document within the hard limit (timeout) enforced by Heroku. schedule a background job to process document and return 200 OK to the browser. browser waits for completion by e.g. background AJAX polling of a flag to see when background job is ready.