WordPress.org

Support

Support » How-To and Troubleshooting » Annoying "establishing a database connection" after site updates

Annoying "establishing a database connection" after site updates

  • After moving my wordpress blog on another server (higher hosting package) I experienced continuous “Error establishing a database connection” error for ex. after I hit update post or add media file i.e when I do some work in admin/dashboard.

    Latest rows from a log are:

    [03-Oct-2012 03:18:58] WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts  WHERE (post_type = 'page' AND post_status = 'publish')     ORDER BY menu_order,wp_posts.post_title ASC made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/astrology/404.php'), get_header, locate_template, load_template, require_once('/themes/astrology/header.php'), wp_nav_menu, call_user_func, wp_page_menu, wp_list_pages, get_pages
    
    [03-Oct-2012 03:19:45] WordPress database error MySQL server has gone away for query SELECT option_value FROM wp_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock
    
    [03-Oct-2012 04:16:35] WordPress database error MySQL server has gone away for query SELECT option_value FROM wp_options WHERE option_name = '_transient_doing_cron' LIMIT 1 made by _get_cron_lock

    I use Hostgator VPS level 7 (5,5cpu 4gb ram). wp-cron is running once a hour from hosting panel, and disabled in wp-option file. database is around 320mb of size, daily traffic is about 5k uniques.

    Any clue how to fix annoing site halt or does someone have a deal with it?

    Thanks,
    A.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I am having the same trouble but can’t figure out why its happening either?

    Please see the reply from my hosting company below. It may be worth getting in touch with your hosting and asking them if they are experiencing similar issues. Hope this helps:

    “This issue was caused by a query that was ran on the server that caused the MySQL service to hang and stop responding. The monitoring team had to force stop the MySQL service in order to remove the stuck query. They have already restarted the service and it is working correctly at this time. The user that caused the issue has been informed of the issue and our monitoring team is working with them to make sure they do not cause this issue again.

    This was not something that you caused and hopefully by working with the user that caused it, we can keep this from happening in the future as well.”

    I have the same issue with several sites running WP 3.5.

    Any ideas how to fix this?

    Moderator kmessinger

    @kmessinger

    Call your host.

    It was working fine in version 3.4.2 so calling my host probably would not help since it stopped working after upgrading to 3.5.

    esmi

    @esmi

    Forum Moderator

    @wpsecuritylock: As previously advised, please post your own topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Annoying "establishing a database connection" after site updates’ is closed to new replies.
Skip to toolbar