Skip to:
Content
Pages
Categories
Search
Top
Bottom

ERROR: bbPress database error – "MySQL server has gone away" for query …..


  • hatter
    Member

    @hatter

    After researching this error for a while, I finally found a solution and wanted to share to hopefully help someone else out, so they don’t go through the same headache.

    Searching for this issue within bbPress lead nowhere, so I abandoned that approach and looked at it from strictly a MySQL perspective. Finally I found that there wasn’t enough time being given to queries. Once the timeout was reached, an error would be thrown, and the query would be abandoned. For one of my client sites I found that, even though we had a dedicated server, the host used a default .cnf file for db settings, and had set the wait_timeout = 10, meaning if a query didn’t respond in 10 seconds (even if the server was under load at the time), the query would fail. This issue was resolved with the following settings:

    interactive timeout = 25

    wait timeout = 45

    Note: The settings may need to be different for your site, and your host may not let you change these settings. I just wanted to mention this in case it can help you.

Viewing 2 replies - 1 through 2 (of 2 total)

  • chrishajer
    Participant

    @chrishajer

    10 seconds is a long time for one query. Have you logged slow queries in your installation to see what’s taking so much time? bbPress doesn’t do that by default. Maybe it’s a plugin or something else on that site?


    hatter
    Member

    @hatter

    I should change that to say, 10 seconds for a connection, not a query. Occasionally when the server is under heavy load due to a lot of users, the total time used on a connection may exceed 10 seconds, causing this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar