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개 답변
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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠