vccw icon indicating copy to clipboard operation
vccw copied to clipboard

mysqli_real_connect(): (HY000/2002) error when uploading files

Open lucaspoignon opened this issue 7 years ago • 3 comments

Operating System: Windows 10 Vagrant Version: 1.9.2 Virtual Box Version: 5.1.6

From time to time, when I try to add a couple of images to the Wordpress media library, it seems my db server crashes and I get the following error:

( ! ) Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/html/wp-includes/wp-db.php on line 1538 Call Stack

Time Memory Function Location

1 0.2006 362840 {main}( ) .../index.php:0 2 0.2006 363128 require( '/var/www/html/wp-blog-header.php' ) .../index.php:17 3 0.2006 363480 require_once( '/var/www/html/wp-load.php' ) .../wp-blog-header.php:13 4 0.2009 364256 require_once( '/var/www/html/wp-config.php' ) .../wp-load.php:37 5 0.2010 365752 require_once( '/var/www/html/wp-settings.php' ) .../wp-config.php:87 6 0.2036 619864 require_wp_db( ) .../wp-settings.php:107 7 0.2041 633232 wpdb->__construct( ) .../load.php:404 8 0.2041 634016 wpdb->db_connect( ) .../wp-db.php:658 9 0.2041 634480 mysqli_real_connect ( ) .../wp-db.php:1538

I have to wait like half an hour or reset the virtual box in order for it to work again. The problem also seems pretty random. Planning to go live next week and would like to know if this is a problem with the vagrant / virtual box or if I will also have this problem on a normal host.

lucaspoignon avatar Apr 27 '17 08:04 lucaspoignon

Hmm ... I am not sure the cause of this problem. I want to wait more information from another users.

Thanks!

miya0001 avatar May 01 '17 02:05 miya0001

Ok

Thanks for your reply!

lucaspoignon avatar May 01 '17 18:05 lucaspoignon

I came across this today.

/var/log/mysql/error.log was showing that mysql had run out of memory. I doubled the memory in site.yml and did a vagrant reload and so far, so good.

I'm not sure if this would fix everyone's error, but, check your logs.

calebtr avatar Sep 12 '17 18:09 calebtr