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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则