Skip to content

MySQL connections maxing out resulting in Too many connection error on invalid credential #329

@sushilnayak

Description

@sushilnayak

We recently had encountered and issue where invalid/expired credential were used to deploy single instance of our microservice using kotlin and aurora mysql in our test environment.

While trying to validate the deployment, we started seeing too many request error. Interestingly the r2dbc pool had been set to max 20 connections, but our microservice formed more than 500 connections( maximum connection db could take). At db end, the wait for connection timeout parameter was set to 8 hours and thats when connection dropping starts to happen, but during hte 8 hours nobody is able to acccess the DB.

So, DB connections are not released by jasync when invalid credential is entered. To confirm this was issue related to jasync only, i tried to use dev.miku mysql r2dbc driver and there connection does not go beyond 20 and connections are released quickly. It seems jasync does not drop connection if AuthenticationError is recieved. Interestingly the exception jasync is throwing is UnsupportedAuthenticationMethodException : Unknown authentication method -> 'caching_sha2_password'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions