Jump to content

[Inactive] How to Kill Mysql DB connections


joaopm33

Recommended Posts

Hello,

 

As dumb as it may sound, I think I created a lot of connections with my DB without closing them. I am trying to Kill them but i cant see the connections. When I type :

SHOW PROCESSLIST

I get two processes:

 

  s_fulltext.png Id User Host db Command Time State Info dot.gif Termina 17453 joaopm33 localhost joaopm33_Mush_Instagram Query 0 starting SHOW PROCESSLIST dot.gif Termina 17454 joaopm33 localhost NULL Sleep 0   NULL                                  

When trying to kill them i get an unknow id error.

 

I should see 4 connections once I am getting the error:

mysql.connector.errors.ProgrammingError) 1203 (42000): User joaopm33_joaopm33 already has more than 'max_user_connections' active connections

What am I doing wrong here (beside opening all those connections in the first place)

 

 

Link to comment
Share on other sites

At the time of this post you have zero open connections. The best way to close connections is to do so in your code. It depends on the language that you're using, but some languages like java are well known for trying to open hundreds of connections and never closing any of them. It might also be useful information for you to know that Tommy doesn't have a limit on the number of mysql connections currently. If someone starts to abuse that we may make a limit though.

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

As dumb as it may sound, I think I created a lot of connections with my DB without closing them. I am trying to Kill them but i cant see the connections. When I type :

SHOW PROCESSLIST

I get two processes:

 

  s_fulltext.png Id User Host db Command Time State Info dot.gif Termina 17453 joaopm33 localhost joaopm33_Mush_Instagram Query 0 starting SHOW PROCESSLIST dot.gif Termina 17454 joaopm33 localhost NULL Sleep 0   NULL                                  

When trying to kill them i get an unknow id error.

 

I should see 4 connections once I am getting the error:

mysql.connector.errors.ProgrammingError) 1203 (42000): User joaopm33_joaopm33 already has more than 'max_user_connections' active connections

What am I doing wrong here (beside opening all those connections in the first place)

Hi, have you solved the problem?

 

Where did you write that command?

Link to comment
Share on other sites

You can use phpmyadmin to run raw sql commands. Click the database you want on the left navigation pane, and then hit the sql tab along the top. The commands you type in that box will be run. The other option is you can enable remote mysql connections to your database, and then run an application or command such as

 

mysql --host=johnny.heliohost.org --user=antobarb --database=antobarb_example -p
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...