Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5540

server has gone away in /wp-includes/wp-db.php

$
0
0

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.


Viewing all articles
Browse latest Browse all 5540

Trending Articles