Tagged: DB Cluster
-
AuthorPosts
-
June 23, 2021 at 12:33 pm #39692ThomasGuest
Pro subscriber here.
We’re trying to use W3TC with a master read/write database and a slave read-only database. Created and saved the db-cluster-config.php file with appropriate settings but were unable to connect to both databases. We found we needed to add the last line of code in this snippet from Enterprise_Dbcache_WpdbInjection_Cluster.php to get it working:
if ( isset( $GLOBALS['w3tc_dbcluster_config'] ) ) {
$this->apply_configuration( $GLOBALS['w3tc_dbcluster_config'] );
} elseif ( file_exists( WP_CONTENT_DIR . '/db-cluster-config.php' ) ) {
// The config file resides in WP_CONTENT_DIR
require WP_CONTENT_DIR . '/db-cluster-config.php';
$this->apply_configuration( $GLOBALS['w3tc_dbcluster_config'] ); // <- needed to add this to actually apply the config once the file is included
Does this seem appropriate? From our research, it appears others have had problems getting clusters to work too, and we suspect this could be the issue.
The next issue we ran into is that the db_cluster class seems to be breaking the # of found_posts for every query, returning 1 instead of the actual number of found queries. This affects a number of core functions like pagination, etc. Verified this was the cause by disabling dbcluster. In addition, plugins like Query Monitor are unable to log any queries when dbcluster is active.
Is the cluster functionality something that is supported for Pro license holders? It seems like this isn’t really an officially supported feature given the issues we’ve encountered and the lack of documentation.
Thanks for any insight!
June 23, 2021 at 12:48 pm #39694Marko VasiljevicKeymasterHello Thomas,
Thank you for reaching out and thank you for your questions.
DB cluster is for Pro users only and it is supported by W3 Total Cache.
Let me make some tests and I’ll get back to you on this as soon as I have more details to share.
Thanks! -
AuthorPosts
- The topic ‘DB Cluster Issues’ is closed to new replies.