AWS RDS Postgres and spring boot microservices - too many connections

by hopsey   Last Updated June 13, 2019 09:00 AM

The application is run on +/-20 java spring boot microservices with AWS EKS. Each one replicates to 3 instances, so the setup is with 60 microservices.

RDS Postgres is run on db.t2.medium with limit up to 400 connections.

Obviously while starting up services it throws FATAL: remaining connection slots are reserved for non-replication superuser connections.

What is the proper way to deal with the problem with the described 60+ microservices architecture

  • increase RDS instances
  • increase RDS connections manually
  • limit connections on application level with spring spring.datasource.maxActive= property?


Related Questions


Updated February 17, 2019 21:00 PM

Updated July 04, 2017 19:00 PM

Updated April 08, 2015 22:00 PM

Updated September 21, 2018 14:00 PM

Updated May 15, 2019 18:00 PM