Too many connections mysql or mysql hangs with replication Enabled at mysql 8.0.27 /
search cancel

Too many connections mysql or mysql hangs with replication Enabled at mysql 8.0.27 /


Article ID: 233899


Updated On:


CA API Gateway


We encountered issues with "Too many connections mysql" when trying to login to mysql.  We also see that mysql is hanging and not providing a response.

We are noticing this after applying the November / December / January monthly platform patch where mysql is at 8.0.27 and greater.

# rpm -qa | grep mysql



Release : 10.0 10.1

Component : API GATEWAY


A major change in 8.0.27 was this changing of replication to default to the multithreader which was new.
According to the MySQL docs setting replica_parallel_workers=0 disables it.

Our Current Monthly Platform Patch of February 2022 addresses this.

If you are unable to apply the Monthly Patch you can follow the below manual steps instead.
Replication: Multithreading is now enabled by default for replica servers

Steps to remediate:

1) Stop SSG service
         # service ssg stop

2) Stop replication
         2A) Stop slave replication on both nodes: mysqladmin stop-slave
         2B) Reset the master configuration on both nodes: mysql -e "reset master"
         2C) Reset the slave configuration on both nodes: mysql -e "reset slave; reset slave all"

3) Update /etc/mysql.cnf to include replica_parallel_workers=0 in the [mysqld] section on both nodes.
         # vi /etc/my.cnf                   on both nodes

         **** my.cnf to look as below.
         # Added on this date mm/dd/yyyy to use legacy replication

4) Restart mysql on both nodes.

         # service mysql restart

5) Re-establish replication 
         Follow article:

Additional Information

Starting with the monthly Platform patch Layer7_API_PlatformUpdate_64bit_v10.X-CentOS-2022-03-29.L7P the fix in this KB addressed changes to /etc/my.cnf (Gateway Appliance only)

#Added to disable multithreaded replication from mysql 8.0.27 version