title: Error: sorry, too many clients already
body: <p>I am using PostgreSQL in my NodeJS backend service. All of sudden, when I start the service I am facing below error </p>
  
  <pre><code> connection error error: sorry, too many clients already.
  </code></pre>
  
  <p>PostgresSQL connection config</p>
  
  <pre><code> const pg = require(“pg”);
   const client = new pg.Client({
          host: “txslmxxxda6z”,
          user: “mom”,
          password: “mom”,
          db: “mom”,
          port: 5025
   });
  </code></pre>
  
  <p>I am unable to query database because of the above error. I am unable to fix this issue. Can you please suggest the solution</p>