Multi-DB 3.2.1 Slowness after update

Has anyone else noticed a measurable slowness after they updated to 3.2.1?

It's so bad I'm considering going back to 3.1.6.

I'm not sure what it's doing, but everything from page loads on the front-end, to wp-admin page loads on the back-end it's just horribly slow.

  • aristath
    • Recruit

    Hello there @1parkplace, I hope you're well today!

    I just talked to the plugin developer about this and nothing on this update would justify the results you're getting...
    Can you please enable error debugging and give us the debug.log file?

    You'll have to do some changes in your wp-config file:
    set WP_DEBUG to true by changing this line:
    define('WP_DEBUG', true);
    Then add these 2 lines below it:

    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    This will enable debug logging into wp-content/debug.log file
    Once you make your changes, recreate your issue and send us the file so that we may take a look.

    Cheers,
    Ari.

  • aristath
    • Recruit

    @1parkplace I'm sorry for the delay on this post... I just had a day off.

    I have notified the plugin developer on this one, as we're going to need his insights.
    In the meantime can you please upload your file somewhere and post a link here so that we may get your file and examine it?

    Cheers,
    Ari.

  • 1parkplace
    • Design Lord, Child of Thor

    Hi Guys,

    I wanted to provide a further update. I will upload the debug.log, but I have scoured the WHOLE thing and found nothing useful, especially nothing related to multi-db.

    This slowness we are experiencing is 100% without a doubt related to the latest update. It has caused erratic behavior on our MySQL server, made evident by performance logs and graphs.

    After today, I rolled back to 3.1.6 and voila, it is fast again and the performance graphs have stabilized.

    See here: http://sageweb.1parkplace.com/debug/Server-Stats1.PNG
    -Notice the erratic behavior beginning early 12/13, when Multi-DB was patched.
    See here: http://sageweb.1parkplace.com/debug/Server-Stats2.PNG
    -Further stats of Memory Disk and Network

    Here is a 7 day window before update: http://sageweb.1parkplace.com/debug/usagefrom1205-1212.PNG

    Here is the 7 day window with latest Multi-DB installed: http://sageweb.1parkplace.com/debug/usagefrom1212-1219.PNG
    -Notice the mark of 12/13 early morning - you see the immediate change as soon as the patch was installed.

    The debug.log if you still want to look is located here: http://sageweb.1parkplace.com/wp-content/debug.log

  • 1parkplace
    • Design Lord, Child of Thor

    We self-host, no cPanel. I will have to setup FTP on Monday.

    I have a feeling this is related to some code that was removed. I have compared 3.1.6 and 3.2.1. I noticed that in 3.2.1, there is a code block that was removed related to checking if it is already connected to the db:

    // check if we're already connected.
    		if ( isset( $this->dbh_connections[$query_data['dataset']] ) && is_resource( $this->dbh_connections[$query_data['dataset']]['connection'] ) && $this->dbh_connections[$query_data['dataset']][$operation] > 0 ) {
    			// Found one we can use - hoorah
    			$dbh =& $this->dbh_connections[$query_data['dataset']]['connection'];
    			$this->select( $this->dbh_connections[$query_data['dataset']]['name'], $dbh );
    
    			// reset the connections
    			if ( ( $k = array_search( $query_data['dataset'], $this->open_connections ) ) ) {
    				unset( $this->open_connections[$k] );
    				$this->open_connections[] = $query_data['dataset'];
    			}
  • Eugene Manuilov
    • Syntax Hero

    Hi @1parkplace

    I have reworked a logic how the plugin connects to a database. Previously a connection had been checked/opened each time when a query had been executed. Now the plugin connects to a database each time when WordPress switches to a new blog (or set initial one). All connections are added to a connection pool which could contain up to 10 connection simultaneously (set by $max_connections var). Maybe this is the reason of the issue.

    Could you check your site from another browser, where you are not logged in, and check whether the slowness still exists or not? And finally, how many blogs your network has?

    Regards,
    Eugene

  • 1parkplace
    • Design Lord, Child of Thor

    Hi Eugene,

    Yes, the problem still exists when logged out.

    We have about 70-75 sites currently, with the expectation to add a few hundred more in 2014, so this slowness issue is going to cripple us.

    3.1.6 will work for now. I just can't update until we determine what is causing the connections to go crazy.

  • Eugene Manuilov
    • Syntax Hero

    Hi @1parkplace

    So is there any way to get an access to your site and investigate the matter? Otherwise I can't help you and else people who possibly could have the same issue.

    Please, send me admin dashboard, FTP + cPanel access credentials and I will look at it. Also please include your IM id for direct communication to speed up the progress.

    I will be unavailable till the 3rd of Jan, but when I come back I will be able to look at it.

    Regards,
    Eugene

  • 1parkplace
    • Design Lord, Child of Thor

    It would appear at first glance that you have fixed the slowness problem. I will continue to monitor and evaluate and provide you an update after 24 hours has passed.

    Can you explain in a bit more detail what the problem was and how you fixed it?

    Thanks!

    Drew

  • Eugene Manuilov
    • Syntax Hero

    It would appear at first glance that you have fixed the slowness problem.

    Great! Looking forward to hearing more info from you.

    Can you explain in a bit more detail what the problem was and how you fixed it?

    I have come to conclusion that the slowness appears because of new approach which I have added in a previous release. As I explained above, I have moved database connection switching when a blog is switched internally in WP. This approach caused issues, so I have removed it and get back to the previous one.

    Regards,
    Eugene

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.