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
  • Consider posting the last 400 lines of your error log when this event occurs again for analysis. And post a comment to @wilsonhauck for SE to make me aware of your post. – Wilson Hauck Dec 19 '19 at 21:52
  • Let's see the connection pooling parameters. Describe the clients. – Rick James Dec 20 '19 at 6:18
  • 1
    Posting just 10 SECONDS of General Log when these items are firing could allow someone to determine what is going on or have some clues. Do NOT forget to turn OFF the General Log at 10 seconds, FLUSH LOGS, then post the General Log complete text to pastebin.com, please. – Wilson Hauck Dec 25 '19 at 13:41
  • I am getting the same messages in my slow query log in mysql, I am also using Pomelo, and I'm getting the same "all connections in pool are in use" message. I'm using the built in mysql slow query log and it is filled with other queries that are causing things to grind to a halt. I think these might be a symptom and not the cause. – Luke Mar 7 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.