title: Laravel jobs leaves an idle postgresql process on DEALLOCATE
body: <p>Every time a Delayed Job is has run on my server I can see a new idle process in postgreSQL. Running <code>select * from pg_stat_activity;</code> I can see:</p>
  
  <pre><code>DEALLOCATE pdo_stmt_00000018
  </code></pre>
  
  <p>I tried to understand, and one more line (and one more process in <code>htop</code>) appears each time a delayed queued job had just ran. </p>
  
  <p>The last line of my Job is:</p>
  
  <pre><code>$this-&gt;log-&gt;info("Invitation {$this-&gt;invitation-&gt;uuid} sent");
  </code></pre>
  
  <p>And I can see this in my logs, so everything is alright BUT it does not clean up after. I have a idle process every time with "DEALLOCATE pdo_stmt_00000xxx".</p>
  
  <p>What can I do to avoid this problem? What is causing this?</p>
  
  <p>Here is my supervisor config:</p>
  
  <pre><code>[program:laravel-queue-worker]
  process_name=%(program_name)s_%(process_num)02d
  command=php /path/to/my/site/artisan queue:work --queue=invitation,default --sleep=3 --tries=3
  autostart=true
  autorestart=true
  user=www-data
  numprocs=2
  redirect_stderr=true
  stdout_logfile=/path/to/my/logs/worker.log
  </code></pre>
  
  <p><em>Side note: the idle processes disappear when I run <code>php artisan queue:restart</code></em></p>