WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection - when adding featured image (4 posts)

  1. littlebloke
    Member
    Posted 2 months ago #

    Hi,

    We have an issue where posting a featured image to a blog post takes the WordPress site down (giving the 'Error establishing a database connection' message) and makes the server unresponsive for between 20-40 mins! The site comes back and the featured image is in place.

    We have disabled all plugins and the theme, but can not identify a specific plugin that is causing the issue as it may or may not occur with plugins disabled/enabled (and the theme disabled), there seems to be no obvious patten or relationship with the plugins.

    We are running two completely separate installs (one for development) and have now managed to be successful in taking down both, much to the ire of our managers!

    Our IT team tells me that the system becomes completely unresponsive and inaccessible, and multiple 'processes' are being created, causing the system to grind to a halt.

    This appears to have originated after the update to 3.8, and has persisted since. We seem to have been misguided thinking that this was caused by either the theme or plugins, which have been updated/disabled since. It’s quite staggering that we manage to take down the entire system.

    We have noted one other anomaly that can occur, we do not know if this is related. Occasionally the featured image is missing, scrutinising the code shows the following.

    The code for the correctly displaying featured image (on our homepage) is:

    [ Moderator note: Code fixed, please wrap code in backticks or use the code button. ]

    <img src="https://[website]/wp-content/uploads/2014/04/image-100x75.jpg" data-rel="https://[website]/wp-content/uploads/2014/04/image-200x150.jpg" width="100" height="75" alt="Alt text" class="wp-post-image" pagespeed_url_hash="1398416865">

    And the broken code is:

    <img src="" data-rel="" width="" height="" alt="Alt text" class="wp-post-image" pagespeed_url_hash="2471356566">

    These are the plugins we use:

    - Advanced Access Manager 2.6
    - BackUpWordPress 2.6.2
    - bbPress 2.5.3
    - bbPress Enable TinyMCE Visual Tab 1.0.1
    - Buddy Plugin 1.2 (for theme)
    - BuddyPress 2.0.1
    - BuddyPress Community Stats 0.5.1
    - BuddyPress Docs 1.7.0
    - BuddyPress Group Email Subscription 3.4
    - BuddyPress Profile Visibility Manager 1.0.5
    - Easy WP SMTP 1.07
    - Email Login 4.6.3
    - GB bbPress Attachments 2.1
    - Google Analyticatoor 6.4.7.3
    - Invite Anyone 1.2
    - Jetpack by WordPress.com 2.9.3
    - Prevent Password Reset 0.2.0
    - Twitter Widget Pro 2.6.0
    - WP Email Template PRO 1.1.3.1

    Theme is:

    - Buddy (by Ghostpool)

  2. We have an issue where posting a featured image to a blog post takes the WordPress site down (giving the 'Error establishing a database connection' message) and makes the server unresponsive for between 20-40 mins! The site comes back and the featured image is in place.

    It is odd that you can reproduce it that way but that often indicates a problem with your mysql server, meaning it's overloaded and not taking anymore connections.

    Being able to reproduce it is useful though. Are there any errors in your mysql server's log file at those times?

    Have you asked your IT if they can beef up the settings on mysql?

  3. littlebloke
    Member
    Posted 2 months ago #

    Thanks for the advice, I'll ask and get back to you.

  4. littlebloke
    Member
    Posted 2 months ago #

    Sorry for the delay in getting back to you, our IT Crowd are always very busy. This is the response I had:

    It seems like multiple Apache worker processes are created when trying to set the featured image using this theme. It seems strange that on the normal theme there is no problem, so I'm bit reluctant to blame MySQL straight away as this WP installation has been live for sometime before this error started to occur.

    unfortunately they did not supply any logs for me to scrutinise.

    I'm going to take another look at the theme specifically to ensure that this is defiantly not the culprit, there have been a host of recent updates to a number of the plugins we are using so hopefully something will to the trick.

    I'm hoping that this is not a corruption issue!

Reply

You must log in to post.

About this Topic