10

I keep getting:

SQLSTATE[08006] [7] FATAL: remaining connection slots are reserved for non-replication superuser connections (SQL: select * from "sheeps" where "name" = foobar limit 1)

So I thought of modifying the value in the paramaeter group (max_connections default on 270)

But when I change the max_connections to a higher value, I get:

"Error saving: Cannot modify a default parameter group. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: b5179a68-xxxx-44a8-b396-xxx; Proxy: null)"

I have the max limit Laravel Vapor offers: 3008 mb.

user1469734
  • 851
  • 14
  • 50
  • 81

1 Answers1

21

You can't modify the default parameter group in AWS RDS.

You need to create a custom parameter group, set max_connections in that group, and then attach it to your PostgreSQL RDS instance. You'll then need to restart your PostgreSQL RDS instance for the change to take effect.

Adil B
  • 14,635
  • 11
  • 60
  • 78
  • Sounds great, but how can I do that? – user1469734 Nov 20 '20 at 17:37
  • 1
    See this guide: https://aws.amazon.com/premiumsupport/knowledge-center/rds-modify-parameter-group-values/ – Adil B Nov 20 '20 at 17:38
  • too bad.. "Incompatible-parameters" when setting it to 10000 – user1469734 Nov 20 '20 at 18:17
  • 1
    See "Maximum number of database connections" on this page: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html – Adil B Nov 20 '20 at 19:01
  • Nowadays you need to first create a custom parameter group and then assign to the database. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html#USER_WorkingWithParamGroups.Creating – Jan Sila Nov 24 '21 at 19:38