title: Too many connections error with Laravel 5.4 and Mariadb
body: <p>I have recently upgraded my laravel app from 5.1 to 5.4. My server is now on PHP 7 and Maria db 10.1.22. Now I am getting a really weird error. Sometimes, I would just try to refresh my browser and PHPMyAdmin would display <code>#1040 - Too many connections</code>. Other times I would click on a new link on my app and then would get this same error. I did some research on the internet and executed the command below:</p>
  
  <pre><code>show variables like 'max_connections`
  </code></pre>
  
  <p>The above command gave 100. Which I then increase to 500.</p>
  
  <p>But now I still get the error. This is weird to me because I have oracle mysql 5.6 installed on another server and max_connections is 151 and for over a year and a half I have not experienced this error. </p>
  
  <p>When I run the command <code>show processlist</code>, I get the result below and this keeps increasing. is this normal?</p>
  
  <p><a href="https://i.stack.imgur.com/xA2q1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xA2q1.png" alt="enter image description here"></a></p>
  
  <p>What could be the issue with Mariadb and how can I fix it.</p>