Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update:</strong> The solution below works, but is not recommended. For resque concurrency on heroku use the <a href="https://github.com/nevans/resque-pool" rel="nofollow">resque-pool</a> gem.</p> <hr> <p>It is possible if you use the <code>COUNT=*</code> option. Your procfile will look something like:</p> <pre><code>web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb resque: env TERM_CHILD=1 COUNT=2 RESQUE_TERM_TIMEOUT=6 QUEUE=* bundle exec rake resque:workers </code></pre> <p>It is impotant to note that the rake task in the Procfile is <code>resque:workers</code> and <strong>not</strong> <code>resque:work</code>. </p> <hr> <p><strong>Update Explanation</strong></p> <p>There are major problems with the <code>COUNT=*</code> option and the <code>rake resque:workers</code> invocation in production on heroku. Because of the way resque starts up the multiple workers using threads, all of the <code>SIGTERM</code>, <code>SIGKILL</code>, etc. handling that allows workers to stop the current job, re-enqueue job, and shut down properly (including de-registering) will ever happen. This is because the the signals are handled by the main process not trapped by the threads. This can cause phantom workers to remain in the worker list long after they've been killed. This is probably why there is <a href="https://github.com/resque/resque/blob/1-x-stable/lib/resque/tasks.rb#L45" rel="nofollow">a comment</a> in the resque code that warns that the resque:workers should only be used in development mode.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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