How to change maximum limit of simultaneous connections to db

0

When I exceed 100 connections, I get the error:

"FATAL:  remaining connection slots are reserved for non-replication superuser connections"

How to change the postgresql.conf max_connections parameter in Google Cloud SQL?

    
asked by anonymous 31.05.2017 / 18:31

1 answer

0

No Cloud SQL FAQ , it says:

"There are no query limitations per second (QPS) for Google Cloud SQL instances. However, there are limits on the number of connections, sizes, and applications running on Google App Engine." Translated from English)

Soeverythingindicatesthatthisisalimitationonthetypeofinstancebeingused-thatis,youcannotchangeunlessyouuseanotherinstancetype.

  

It'sworthmentioningthat100simultaneousconnectionsisnotalownumber-it'sinterestingtochecktherealneedandtrytooptimizetheuseoftheseconnections.

Furtherdownthepage,thereisthefollowingtext:

HowdoImanageconnections?
"The best way to manage connections will depend on each case but overall we recommend using connection pooling. Connection pooling will protect the database from a huge amount of connections being created too fast, which could impact performance. " (Translated from English)

So this is already a possible optimization for your application.

  

Questions that still need to be asked:

  • Why are 100+ concurrent connections required?
  • Is the App closing the connections correctly after using them?
  • Are you using a connection pool?
01.06.2017 / 07:26