Change max_connections value for AWS RDS managed service for mariadb


we have a Squirro installation on AWS which is setup to use the MariaDB managed service from RDS.
The RDS instance was recently down-scaled to db.t3.small with 2GB RAM.
After that change, we are sometimes seeing errors in some of the Squirro services related to MySQL Error 1040, ‘Too many connections’.
The current max_connections value is the AWS default: LEAST({DBInstanceClassMemory/25165760},12000)

Would it be ok to change that to a static value? What would in case be a good reference value? (Note: this is a dev/test server)
Or should we scale up the RDS instance type to get a higher “default” max_connections value?



Hi Chiara.

Squirro is quite heavy on connections as we have a small fleet of micro services, with quite a few of those services needing db connections.

Based on this AWS article you can increase the value.

I would increase it carefully, as each connection will need some RAM.
But we’ve been operating Squirro with smaller instances without any issues, so I don’t foresee any issues. db.t3.small has 2 GB of ram, that is a lot actually.

If all else fails let me know, and we could also decrease the connection pool sizes. This can negatively affect the performance, so it is not recommended for a PROD setup, but on a DEV environment it can work.



thanks Toni!

I also found this documentation page with more details and troubleshooting hints:


Right, didn’t even remember writing this :wink:
But yes, will help you find the biggest contributors.

If you look at a services shipped default init file, e.g. for the topic service its under

You’ll see there there is also this setting active:
connection_recycle_interval = 3600

I have never changed this setting, but it might be worth trying to lower this.