Failed to connect to database RDS MySQL

0

I have an RDS MySQL, which used my owner DB instance parameter group, where I have:

max_connections =6000 table_open_cache = 6000 thread_cache_size = 4000 require_secure_transport = OFF max_prepared_stmt_count = 65536

I am doing a new rollout using this RDS MySQL, my client system opens around 5000 connections simultaneously, but when my client system tries appear this message error many times

23May24 07:35:10 05B3 00000 Failed to connect to database: SSL connection error: unknown error number 23May24 07:35:10 0B96 00000 Failed to connect to database: SSL connection error: unknown error number 23May24 07:35:10 05AE 00000 Failed to connect to database: SSL connection error: unknown error number 23May24 07:35:10 0B90 00000 Failed to connect to database: SSL connection error: unknown error number

Enter image description here

When I try again to reboot my client system

23May24 03:07:24 ---- ----- Can't connect to DB Host '172.31.16.180' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 23May24 03:07:24 ---- ----- Starting Bind

I am not used SSL connections,

My target RDS MySQL was not being restarted/failover, during the error.

What is the error o what I need to setup in my RDS MySQL.

1 Answer
0

If a specific host receives too many connection errors before a successful connection is established, then the host will be prevented from attempting to connect. This is a security feature by the MySQL engine to prevent unwanted connections from attempting to connect to the database. The default value is 100 and can be tuned to your security requirements and environment.

Resolution

  1. Increase the max_connect_errors value suitable to your use-case. Please see[1] , (Please use customer parameter group to modify the parameter)

  2. Unblock hosts using ‘flush hosts;’ command by using below command [Use EC2 to run the following command] mysqladmin -h <RDS_ENDPOINT_URL> -P <PORT> -u <USER> -p flush-hosts.

  3. Reboot the instance

[1] https://aws.amazon.com/blogs/database/best-practices-for-configuring-parameters-for-amazon-rds-for-mysql-part-3-parameters-related-to-security-operational-manageability-and-connectivity-timeout/

AWS
answered a year ago
profile picture
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions