Error establishing a database connection -Woocommerce


#1

Hello everybody When I use EEV4 my problem is this error when I see website all is good but if I check some categories and some specific pages its good but after give to this error# Error establishing a database connection I dont know how fixed I have 1000 product and server from vultr and 1 cpu 512 mb memory thank you for yours answer have a good days


#2
[04-Jan-2019 17:07:17] WARNING: [pool www] child 1750 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:07:17] WARNING: [pool www] child 1750 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:27:15] WARNING: [pool www] child 1803 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:27:15] WARNING: [pool www] child 1803 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:37:48] WARNING: [pool www] child 1840 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:37:48] WARNING: [pool www] child 1840 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:57:40] WARNING: [pool www] child 1937 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 17:57:40] WARNING: [pool www] child 1937 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:03:23] WARNING: [pool www] child 1962 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:03:23] WARNING: [pool www] child 1962 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:07:05] WARNING: [pool www] child 1975 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:07:05] WARNING: [pool www] child 1975 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:09:44] WARNING: [pool www] child 1987 exited on signal 9 (SIGKILL) after 105.444986 seconds from start
[04-Jan-2019 18:09:44] NOTICE: [pool www] child 1994 started
[04-Jan-2019 18:14:15] WARNING: [pool www] child 2004 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:14:15] WARNING: [pool www] child 2004 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:27:12] WARNING: [pool www] child 2049 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:27:12] WARNING: [pool www] child 2049 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:33:47] WARNING: [pool www] child 2079 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 18:33:47] WARNING: [pool www] child 2079 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2345 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2345 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2342 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2342 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2348 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:50:52] WARNING: [pool www] child 2348 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:53:12] WARNING: [pool www] child 2354 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:53:12] WARNING: [pool www] child 2354 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:53:13] WARNING: [pool www] child 2355 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 19:53:13] WARNING: [pool www] child 2355 said into stderr: "NOTICE: PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /var/www/htdocs/wp-includes/wp-db.php on line 1924"
[04-Jan-2019 20:30:06] NOTICE: Terminating ...
[04-Jan-2019 20:30:06] NOTICE: exiting, bye-bye!
[04-Jan-2019 20:30:08] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[04-Jan-2019 20:30:08] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[04-Jan-2019 20:30:08] NOTICE: fpm is running, pid 1
[04-Jan-2019 20:30:08] NOTICE: ready to handle connections

and that is wp-db.php on line 1924

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

		if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
1924			$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->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
		}


#3

I would say your problem is in 512mb RAM. Try upgrading to 1gb at least.


#4

thanks I will do it now thankss


#5

@bredpit I think you are right its work like good thanks A lot


#6

Great. I’m glad I helped. :slight_smile: