The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error establishing a database connection

Discussion in 'General Discussion' started by Sidewinder, Sep 11, 2014.

  1. Sidewinder

    Sidewinder Registered

    Joined:
    Sep 10, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Had a couple of emails alerting me of the following for multiple accounts
    lfd on ****: Excessive resource usage: **** (18279 (Parent PID:14970))

    Resource: Virtual Memory Size
    Exceeded: 223 > 200 (MB)
    Executable: /usr/bin/php
    Command Line: /usr/bin/php /home/***/public_html/index.php
    PID: 18279 (Parent PID:14970)
    Killed: No

    Resource: Virtual Memory Size
    Exceeded: 207 > 200 (MB)
    Executable: /usr/bin/php
    Command Line: /usr/bin/php /home/***/public_html/wp-cron.php

    Loaded up a website and noticed "Error establishing a database connection" - checked other accounts and they had the same issue.

    I'm wondering if the above email alerts were related?

    Restarted MySQL and this was fixed.

    Plugins: Munin, CSF, Mod Security

    Also noticed Munin is showing mysql as red since I had installed it!
    2014091200493122.png
    I've looked through error_log and can't see anything glaringly obvious, so hoping perhaps somebody else has had the experience before I go checking every log file? :0
     
  2. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Please check mysql service status if it's stop try to restart the service.

    Also check the memory status for server using command free -m
     
  3. Sidewinder

    Sidewinder Registered

    Joined:
    Sep 10, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hey,
    I actually re-installed WHM about 12 hours ago as I had changed A LOT of settings to try to get a high configserver & firewall security rating - I didn't make a note of what I had changed so opted for a fresh install and account restore.

    Unfortunately I'm still getting the following emails
    "lfd on <domain>: Excessive resource usage: <username>"

    MySQL hasn't crashed yet though.

     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,833
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Is your server load high? You can review MySQL active processes with a command such as:

    Code:
    mysqladmin processlist
    Our "Optimization" forum may also be of help to you:

    cPanel Forums - Optimization

    Thank you.
     
Loading...

Share This Page