connection limit "500" exceeded for non-bootstrap users
Hi, I'm using node-postgres for connecting to redshift and I'm getting the above error often when I'm starting my new Node server. I'm creating connections using pool.
Regards jagadeesh
Maybe you should share some code...
var config = { user: "sampleUser", database: "sampledb", password: "sample", port: "xyz...", host: "xyz...", min: 10, max: 50, idleTimeoutMillis: 30000 };
var pool = new pg.Pool(config);
This is the code i'm using for each request and each request have some 8 to 10 queries.
2 kinds of errors i'm getting often: 1.connection limit "500" exceeded for non-bootstrap users 2.ECONN timed out
You should only create the Pool once and re-use it in each request.
Yah, instantiate one pool for your app and it will limit connections down to 50 in your case (max: 50)
Thanks for the help @Tigerino