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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ