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

0

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.

已提问 9 个月前376 查看次数
1 回答
0

Hello.

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
专家
已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则