MySQL RDS 'max_connections_per_hour' error, what are my options?

0

I'm getting the following error for a DB I have. (db.t2.micro)

“1226 (42000): User ‘?????????’ has exceeded the ‘max_connections_per_hour’ resource (current value: 85)”

What can I do to increase max connections per hour?

I did see possible solutions on here but they don't seem to work in RDS.

Most of the solutions that I read about include upgrading the instance, which I am willing to do but for my current application it would be overkill. Most of my open and close connections are simple api request.

85 connections in an hour doesn't seem like much, there has to be another solution.

gefragt vor 2 Jahren665 Aufrufe
2 Antworten
0

In RDS max_connections is dependent on instance size. For MySQL the calculation is

{DBInstanceClassMemory/12582880}

A t2.micro has 1GB of memory.

If you make the division it comes to 85.3.

So choosing a larger instance will give you more connections.

Doc: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.MaxConnections

profile picture
JaccoPK
beantwortet vor 2 Jahren
  • I'm getting a max_connections_per_hour, not max_connections. Does that concept still apply? We only have 1-3 connections at at time.

  • Having the same error. This is not the parameter max_connections. It's max_connections_per_hour. I wish to remove it or set it to 0/small number. I do not see the parameter under my.sql.user, but I am getting the error nonetheless.

0

One option to increase your max_connections is to add db connection pooling using RDS Proxy. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html

The database connections will remain open meanwhile the application (I assume that is serverless) will be connecting to RDS Proxy without hitting the max_connection limit.

AWS
beantwortet vor 2 Jahren
  • Having the same error. This is not the parameter max_connections. It's max_connections_per_hour. I wish to remove it or set it to 0/small number. I do not see the parameter under my.sql.user, but I am getting the error nonetheless.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen