• About 1/5 pages of my websites display the error message:

    Warning: mysqli_query(): MySQL server has gone away in /var/www/wp-includes/wp-db.php on line 2056

    Warning: mysqli_query(): Error reading result set’s header in /var/www/wp-includes/wp-db.php on line 2056

    I have already tried everything I could find in this forum and nothing worked.

    Here is the line 2056 in bold:

    private function _do_query( $query ) {
    if ( defined( ‘SAVEQUERIES’ ) && SAVEQUERIES ) {
    $this->timer_start();
    }

    if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
    $this->result = mysqli_query( $this->dbh, $query );
    } elseif ( ! empty( $this->dbh ) ) {
    $this->result = mysql_query( $query, $this->dbh );
    }
    $this->num_queries++;

    if ( defined( ‘SAVEQUERIES’ ) && SAVEQUERIES ) {
    $this->log_query(
    $query,
    $this->timer_stop(),
    $this->get_caller(),
    $this->time_start,
    array()
    );
    }
    }

    I didn’t change anything with my website, but all of a sudden, this message appears. I am so frustrated and sad.

    • This topic was modified 5 years, 2 months ago by salarship.

    The page I need help with: [log in to see the link]

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

The topic ‘server has gone away in /wp-includes/wp-db.php’ is closed to new replies.