title: How should laravel queues set up properly for production with supervisor?
body: <p>I'm trying to setup the use of queues for log storaging, e-mail sending and other tasks.</p>
  
  <p>I decided to use <strong>beanstalkd</strong> and supervisor to control the jobs queue execution. I installed <code>pda/pheanstalk ~2.0</code> with composer, did the proper setups at <code>app/config/queue.php</code>, wrote my Queue class and attempted to execute a task.</p>
  
  <p>This is an example, it's a log in log:</p>
  
  <pre><code>Auth::attempt(array(
                          'email' =&gt; $email,
                          'password' =&gt; $password
                          ));
  
  if (Auth::check()) {
  $debounce = Carbon::now()-&gt;addSeconds(10);
  Queue::later($debounce, 'SaveAcessLog', array('user' =&gt;  Auth::id(), 'ip' =&gt; Request::getClientIp()));
  }
  </code></pre>
  
  <p>So for supervisord I followed <a href="http://posts.danharper.me/laravel-queue-supervisor/" rel="nofollow">this tutorial</a>. After installing it, I followed each step and made sure to make the <code>laravel_queue.conf</code> also the <code>run_queue.sh</code> files executable.</p>
  
  <p>The problem is that I can't get any task executed. When I test <code>sudo supervisorctl</code> I obtain:</p>
  
  <pre><code>laravel_queue                    FATAL      Exited too quickly (process log may have details)
  </code></pre>
  
  <p>Accessing the supervisord log file at <code>/var/log/supervisor/supervisord.log</code> shows:</p>
  
  <pre><code>2015-04-02 20:16:57,251 INFO supervisord started with pid 1269
  2015-04-02 20:16:58,254 INFO spawned: 'laravel_queue' with pid 1316
  2015-04-02 20:16:58,277 INFO exited: laravel_queue (exit status 127; not expected)
  2015-04-02 20:16:59,279 INFO spawned: 'laravel_queue' with pid 1525
  2015-04-02 20:16:59,287 INFO exited: laravel_queue (exit status 127; not expected)
  2015-04-02 20:17:01,294 INFO spawned: 'laravel_queue' with pid 1753
  2015-04-02 20:17:01,303 INFO exited: laravel_queue (exit status 127; not expected)
  2015-04-02 20:17:04,658 INFO spawned: 'laravel_queue' with pid 1808
  2015-04-02 20:17:04,668 INFO exited: laravel_queue (exit status 127; not expected)
  2015-04-02 20:17:05,669 INFO gave up: laravel_queue entered FATAL state, too many start retries too quickly
  </code></pre>
  
  <p>So, if I try <code>php artisan queue:work</code> the task will get executed! What am I missing with my supervisord setup?</p>
  
  <h3>Note</h3>
  
  <p>I'm open to use something different to supervisord in case it's simpler or more efficient.</p>