Database connection drops
-
Hi –
I setup an Amazon Web Services EC2 instance and setup LAMP on it, followed by wordpress.
Everything runs fine at first, but after several hours of running, wordpress fails due to a problem in wp-db.php.I enabled dubugging and got this warning:
[23-Nov-2016 08:06:42 UTC] PHP Warning: mysqli_real_connect(): Error while reading greeting packet. PID=5319 in /var/www/html/wp-includes/wp-db.php on line 1529 [23-Nov-2016 08:06:42 UTC] PHP Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in /var/www/html/wp-includes/wp-db.php on line 1529
Line 1529 in wp-db.php reads:
if ( WP_DEBUG ) { mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags ); } else { @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags ); }
Currently I have host set to ‘localhost’ as recommended by AWS, dbuser is an admin user I created (not root) and dbpassword obviously the users’ password.
This all works if I restart mysql, but it then proceeds to fail after several hours
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Database connection drops’ is closed to new replies.