We have a back-end server using ASP Core 3.0, and we are using pomelo library to make a connection to our MySQL database.
Every now and then the server starts to fire a LOT of SQL exceptions saying that all connections in the pool are in use.
We have a script to analyze slow queries and it's filled with this:
# administrator command: Change user;
User@Host: username[username] @ [x.x.x.x]
Query_time: 8.998701 Lock_time: 0.000000 Rows_sent: 1 Rows_examined:436537
SET timestamp=1576705430`
Just query after query depleting all the connections in the pool.
I don't know where this query is coming from, why it shows for a while and then stops showing.
If I use the SHOW PROCESSLIST;
command I see many processes with no database selected and the query is Change user
!
Is this even a valid command?
Almost everything is left to default for pool settings:
- 100 connections max.
- changed command timeout to 120 seconds
- enable retry on failure (max count 5), tried with this setting
off
as well