At=Error Code=H12 Desc= Request Timeout?

At=Error Code=H12 Desc= Request Timeout?

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:
  1. Run more processes per dyno, with correspondingly fewer dynos. ...
  2. Make slow requests faster by optimizing app code. ...
  3. 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.

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.