• This is the response I get from my hosting provider

    The problems are due to sleeping/hung database connections.

    At this time the MySQL max_user_connections setting is set to 20, meaning that an individual CPanel user can have up to 20 separate database connections at any given time.

    For some reason certain connections you are making to your WordPress database are failing to close and are ‘sleeping’ for extended periods. These sleeping processes are collecting up and once they reach 20 the web site can no longer connect to the database.

    Here is a list of the 20 processes I just killed in order to get WordPress back up and running:

    | 270285 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 25943 |
    | 271946 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 25543 |
    | 278034 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 23781 |
    | 278428 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 23647 |
    | 281686 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22569 |
    | 281688 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22568 |
    | 282325 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22435 |
    | 282611 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22364 |
    | 282715 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22332 |
    | 283335 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 22182 |
    | 284477 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21778 |
    | 285203 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21586 |
    | 285206 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21586 |
    | 285448 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21518 |
    | 285679 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21446 |
    | 286170 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21292 |
    | 286264 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21266 |
    | 286886 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21124 |
    | 287036 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 21070 |
    | 291090 | [DATABASE NAME] | localhost | [DATABASE NAME] | Sleep | 20141 |

    As you can see these processes had all been running from between 5 hours (20141s) and 7.3 hours (25943s).

    You may want to check the WordPress web site and forums for possible causes and solutions. If you have any further questions or if you need anything else please let me know. Thank you for using HostRocket!

    Can anyone tell me what happen? and how to resolve the issue. And its not first time. I already face it 4-5 time in last three days and everytime i have to ask them to close all connection. Can anyone help?

    My site address is: https://www.amaderbarisal.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter voiceofbsl

    (@voiceofbsl)

    I just reset the all plugings via ftp. by pluing.hold

    but still same notice. Error establishing a database connection

    I am in panic.

    DrLightman

    (@drlightman)

    I’m interested on this issue. I also have a lot of sleeping connections. Can’t just disable plugins on the fly on a live installation.

    DrLightman

    (@drlightman)

    Excluding the software problem, since I don’t think WordPress would leave open connections in my installation only, I’m thinking about switching from MyISAM to InnoDB to hope to speed up open/close connections by optimizing locking.

    My db contains about 228,003 posts,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database connction issue. certain connections sleeping’ is closed to new replies.