MySQL Forums
Forum List  »  Router & Proxy

MySQL Router - Active Connections not getting cleaned up/removed
Posted by: Dev Dewboy
Date: August 17, 2022 02:18PM

Hello.
MySQL Routers (MR) are on a VM, load balanced and traffic routed to the physical DB Servers.
On a MR, I have Active Connections that keep increasing and don't get cleaned up. I eventually have to restart the router because it will hit the Max Connections. Sure I can increase the Max Count to a higher limit but the problem still exists and is only a stop gap. I have been able to locate the issue, IMO, to connections from a specific service using JDBC Connection Pool and in Active Connections list it has blank destination IP.
Using the MySQL Router REST API I have been able to get "Connections" to the router which, represents the active connections. I have an example here from 2 points in time. Earlier in the day, the connection has a destination IP. Later, that same record has no destination IP. Here is an example:
With Destination IP, Queried yesterday at around 9:30am yesterday:{"bytesFromServer":17744,"bytesToServer":26847,"sourceAddress":"10.10.10.201:39878","destinationAddress":"10.10.11.13:3306","timeStarted":"2022-08-16T21:11:28.196537Z","timeConnectedToServer":"2022-08-16T21:11:28.198833Z","timeLastSentToServer":"2022-08-16T21:11:30.991969Z","timeLastReceivedFromServer":"2022-08-16T21:11:30.992773Z"}
Without Destination IP, queried this morning:
{"bytesFromServer":17744,"bytesToServer":26847,"sourceAddress":"10.10.10.201:39878","destinationAddress":"","timeStarted":"2022-08-16T21:11:28.196537Z","timeConnectedToServer":"2022-08-16T21:11:28.198833Z","timeLastSentToServer":"2022-08-16T21:11:30.991969Z","timeLastReceivedFromServer":"2022-08-16T21:11:30.992773Z"},
It is these records with blank Destination IPs that are increasing as time passes. Some process, whether at the application side, JDBC Drivers, or on MySQL is blanking the IP out and not removing these "active sessions".
We think it has to do with some code where it is not closing the transaction block some place and it is being looked into. No luck yet.
I was wondering if anyone has experienced this before and can give suggestions at things to look for.

Thanks!
DD



Edited 1 time(s). Last edit at 08/17/2022 02:26PM by Dev Dewboy.

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Router - Active Connections not getting cleaned up/removed
39
August 17, 2022 02:18PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.