Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Force Stop Of Query

forums forums SQLyog Using SQLyog Force Stop Of Query

This topic contains 2 replies, has 0 voices, and was last updated by  Sibin A S 3 years ago.

  • Author
    Posts
  • #13556

    Sweens
    Participant

    Hi 

     

    I’m running a query that worked fine locally when testing, but in the live environment it’s caused the website to crash, with the ‘too many connections’ error.

     

    When I try to stop the query in sqlyog, I get the following error:

     

    Error 1040. Too many connections.

     

    Is there a way to force it to stop, so the site is back to normal?

     

    Many thanks

    Chris

  • #35763

    Sibin A S
    Moderator

    Hi,

     

    This error is returned by the MySQL server since you are running out of connections. The reason would be that you are not closing the connections that you have open.

     

    You have to change ‘max_connections’ to increase total permitted connections.

     

    You may also refer the MySQL official documentation, here >> https://dev.mysql.com/doc/refman/5.7/en/too-many-connections.html

     

     

    Please note, once the respective value is passed to the ‘max_connections’ variable, ensure that the server is restarted for the changes to come into effect.

     

    Regards,

    Sibin
  • #35764

    Sweens
    Participant

    Thanks – through that might be the problem, it is unrealistic; it is already a big site, so the max_concurrent connections is large anyway.

     

    The main thrust of the question though, is how to force a query to stoop – hitting the ‘stop query’ just returned the error and I had no way out of things.

     

    Cheers

    Chris

  • #35765

    Sibin A S
    Moderator
    Can you please check the currently open connections. You may execute the below statement to find the currently opened connections,

     

    SHOW STATUS WHERE `variable_name` = ‘Threads_connected’;” and you may also execute “SHOW PROCESSLIST” to verify the number of currently opened connections.

     

    Please try increasing the max_connections value and then try, as this is the reason that you get the error. You may also refer the MySQL Official documentation regarding the same, here >> http://dev.mysql.com/doc/refman/5.7/en/too-many-connections.html

     

    Regards,

    Sibin

You must be logged in to reply to this topic.