How can I see and terminate the active sessions on my mariadb?


Hi! We have a Mariadb rds (db.m5.xlarge) and lately I've seen that under "Current activity" the amount of sessions goes crazy high which creates a big problem for our app as it starts refusing new connections. When this is happening the CPU Util% remains low. My question is, how can I see and possibly terminate sessions through cli or the console?

Appreciate your help!

  • Closing connections server side is just a paliative solution. I highly suggest you to find which proccess are keeping open connection e fix it.

asked 10 months ago422 views
1 Answer


The number of sessions can be checked with the following command.

show status like 'Threads_connected';

You can check the process being processed with the following command.

show processlist;

You can erase the process by specifying the process ID with the following command.

kill processId;
profile picture
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions