• [21-Nov-2021 19:07:43 UTC] PHP Warning: mysqli_query(): MySQL server has gone away in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:07:45 UTC] PHP Warning: mysqli_query(): Error reading result set’s header in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:20 UTC] PHP Warning: mysqli_query(): MySQL server has gone away in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:21 UTC] PHP Warning: mysqli_query(): Error reading result set’s header in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:21 UTC] PHP Warning: mysqli_query(): MySQL server has gone away in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:23 UTC] PHP Warning: mysqli_query(): Error reading result set’s header in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:48 UTC] PHP Warning: mysqli_query(): MySQL server has gone away in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057
    [21-Nov-2021 19:08:49 UTC] PHP Warning: mysqli_query(): Error reading result set’s header in /data/home/xyu4398740001/htdocs/wp-includes/wp-db.php on line 2057

    * Internal function to perform the mysql_query() call.
    	 *
    	 * @since 3.9.0
    	 *
    	 * @see wpdb::query()
    	 *
    	 * @param string $query The query to run.
    	 */
    	private function _do_query( $query ) {
    		if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
    			$this->timer_start();
    		}
    
    		if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
    2057			$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()
    			);
    		}
    	}
Viewing 1 replies (of 1 total)
  • That’s not (normally) anything to do with your code – unless you’re doing some huge database calculations. What’s happening is that database server is being overwhemled and can’t be contaced/is not responsive.

    The first thing to do is check the queries that are being sent ot the server, and see whaich ones are causing the issue. You should be able to look at the slow query log in your server to find out more information.

Viewing 1 replies (of 1 total)
  • The topic ‘mysqli_query(): MySQL server has gone away’ is closed to new replies.