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.

gefragt vor 9 Monaten376 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen