Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange request timeout on Heroku
    primarykey
    data
    text
    <p>First of all I'm quite familiar with the H12 timeouts on Heroku. I use Delayed Job for long running tasks, etc.</p> <p>The issue I'm seeing is that a rails 3 request that takes 2 seconds locally, is timing out on Heroku. I've added logging for the entirety of the controller action, and both locally and on heroku the code execution takes about 2 seconds. </p> <p>Example from Heroku:</p> <pre><code>2011-09-28T20:06:43+00:00 app[web.2]: Started POST "/xyz" for 69.181.51.78 at Wed Sep 28 13:06:43 -0700 2011 2011-09-28T20:07:12+00:00 app[web.2]: ***saved in 0.027939 seconds 2011-09-28T20:07:12+00:00 app[web.2]: ***split in 0.006164 seconds 2011-09-28T20:07:12+00:00 app[web.2]: ***reject in 0.017268 seconds 2011-09-28T20:07:12+00:00 app[web.2]: ***validate in 0.029043 seconds 2011-09-28T20:07:13+00:00 heroku[router]: Error H12 (Request timeout) -&gt; POST xyz.com/xyz dyno=web.2 queue= wait= service=30000ms status=503 bytes=0 2011-09-28T20:07:13+00:00 app[web.2]: ***duped in 0.561905 seconds 2011-09-28T20:07:13+00:00 app[web.2]: ***dropped cats in 0.005318 seconds 2011-09-28T20:07:14+00:00 app[web.2]: ***added in 0.148055 seconds 2011-09-28T20:07:14+00:00 app[web.2]: ***saved in 0.245283 seconds 2011-09-28T20:07:14+00:00 app[web.2]: ***handled in 1.721555 seconds </code></pre> <p>As you can see from the last line, according to the logging the whole process takes 1.7 seconds, but none of these log lines are showing up for 29 seconds (we're using Rack.Timeout and set it to 29 seconds)</p> <p>The request is a fairly large POST about 72K, and that ***dup log line I'm duping a hash that is about the same size. Is it possible I'm hitting the Heroku memory limit and that would manifest as an H12 timeout?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload