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.

已提問 2 年前檢視次數 665 次
2 個答案
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
已回答 2 年前
  • 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
已回答 2 年前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南