Codeigniter Too many connection __construct()
<p>I am using CI 3.X. Now in my app I using multiple database. Now my hosting server allows max 100 connections, So my app gets down.</p>

<p>In my database configurations I have kept <strong>PCONNECT to FALSE</strong> .</p>

<p>Now My Structure is as follow:</p>

<p>I have a base controller <strong>MY_Controller</strong> which extends to <strong>CI_Controller</strong>.</p>

<p>Then I have a <strong>Customer_Controller</strong> which extends to MY_Controller.</p>

<p>In Customer_Controller I load my secondary database. And this Customer_Controller lives in libraries folder. </p>

<p>All my other controller extend to this controller.</p>

<p>So where Am I going wrong ? Why does my MySQL sever gets this error ???</p>

<p>the error i get it:</p>

<blockquote>
  <p>A PHP Error was encountered</p>
  
  <p>Severity: Warning</p>
  
  <p>Message: mysqli::real_connect(): (HY000/1040): Too many connections</p>
  
  <p>Filename: mysqli/mysqli_driver.php</p>
  
  <p>Line Number: 202</p>
  
  <p>Backtrace:</p>
  
  <p>File: /application/core/MY_Controller.php Line: 7 Function:
  __construct</p>
  
  <p>File: /application/libraries/Admin_Controller.php Line: 7 Function:
  __construct</p>
  
  <p>File: /application/controllers/admin/Dashboard.php Line: 16 Function:
  __construct</p>
  
  <p>File: index.php Line: 315 Function: require_once</p>
</blockquote>