-
-
Notifications
You must be signed in to change notification settings - Fork 139
Description
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'