Failover? #163
Replies: 5 comments
-
I just had a look at #36 and it appears that perhaps mine isn't loading either. I'll do some more troubleshooting. |
Beta Was this translation helpful? Give feedback.
-
It wasn't working because line 20 was being executed (return;) in ludicrousdb.php I have no idea why $GLOBALS['wpdb'] would already be set. I had previously experimented with hyperDB and that worked.. |
Beta Was this translation helpful? Give feedback.
-
It works for me if I place the ludicrousdb files in the plugins folder. I was having issues when these were placed under mu-plugins. |
Beta Was this translation helpful? Give feedback.
-
@stevenmunro - Hi Steve, apologies for hijacking the thread, but did you manage to get this working with a "failover" type scenario? And if so, how on earth did you manage it?? I have a multisite set up, with a master and slave MySQL both working as they should in a private network, but when I added this to the plugins directory and activated, I was expecting to be able to "reset" my master db and while that was whirring away for a few seconds, still be able to access the sites as the slave would kick in? Any help or advice would be much appreciated ;¬) The error I'm getting is: Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/html/wp-includes/wp-db.php on line 1531. I'm using Php7 and MySQL 5.7 - cheers! |
Beta Was this translation helpful? Give feedback.
-
hey digitalle, the reason you get this error is that WP is writing something to db on (almost) all requests, but since your master (for writes) is down, you get this error. hyperdb/ludicrousdb mostly is for splitting reads among multiple slaves or failover of read slaves. Important to notice is that you might still get this error (but only in error log) bc the plugin tries to connect to a downed server, before it finds one that works. |
Beta Was this translation helpful? Give feedback.
-
I might be completely missing something here. If I take the DB server specified in wp-config.php offline, I get the dreaded 'Error establishing a database connection' message. I thought that one of the other servers defined in db-config.php would kick in?
Beta Was this translation helpful? Give feedback.
All reactions