0

I am using MariaDB Galera Cluster (Master/Master) having 5 nodes with specs of

32Core
64GB Ram
Ubuntu 20.04
Personal Vm-Machines at own Datacenter

Top of these nodes, Haproxy is configured which balance the request load for DBs Node

each node is having 2000 Max Connection Limit, but in some situation, we got 2000+ connections on a single node and we are unable to trace why/from where we are getting that many connections requests. can someone guide me on how to check this issue

Thanks

Galera Version: 4 MariabDB 10.5

Qazi
  • 101
  • 4
  • you didn't share any configuration, but I would say to take a look to your haproxy configuration and the balancing mode that you are using in haproxy – c4f4t0r May 20 '21 at 08:25
  • Instead of HAProxy, consider using a proxy designed for this purpose such as MariaDB's own MaxScale. – Michael Hampton May 20 '21 at 10:56
  • @c4f4t0r Can you tell me, which log should I share with you? I will share it – Qazi May 20 '21 at 11:46

1 Answers1

0

Connect with the commandline "mysql". SHOW PROCESSLIST. It may show 2000 rows where nearly all of them say Sleep. It will also provide user and host for where the connections are coming from.

It sounds like you have "connection pooling" turned on somewhere, perhaps in haproxy?

2000 is unreasonably high except for a very few production systems, please justify that number. On the other hand, I have seen 1000 connections on a 2GB server (long ago), so I don't think there is any serious problem with hitting 2000 -- if most are "Sleep".

Check SHOW GLOBAL STATUS LIKE 'Threads_running'; If it is more than, say, 100, you might have a problem. That is how many are non-Sleep at the instant when you probe it.

Rick James
  • 2,463
  • 1
  • 6
  • 13