title: How to prevent Laravel queue job, schedule and cron job from killing the server
body: <p>My problem is more of fallback I think, now I have a two queue job in my Laravel job queue, and I am using database Driver. The first command create credentials for my user from another site base on API calls, and the second is to email for verification and 2FA. Also, there is another command that update change my unit conversion rate.</p>
  
  <pre><code>protected function schedule(Schedule $schedule){
  $schedule-&gt;command('update:conversionRate')-&gt;everyFiveMinutes();
  $schedule-&gt;command('queue:work')-&gt;everyMinute(); 
  } 
  </code></pre>
  
  <p>Queue job are added to my queue using dispatch command and shouldQueue interface the API call uses the dispatch function while the email uses shouldQueue.</p>
  
  <p>Now it work because I can see the jobs in my database. But when the server cron job runs it will crash, and my Log file shows that the my MySQL users has reach it maximum connection limit. Hence nobody can assess the database using that user account.</p>
  
  <p>So my question how do I setup the cron job and <code>queue:work</code> so that it does not crash the server?</p>