WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
[resolved] Domain Mapping SLOW (?) (15 posts)

  1. tc_s1
    Member
    Posted 1 year ago #

    I have a small multisite installation running on AWS micro instance as I tweak to bring online. It's a vanilla install but I have added this plugin, the Ultimate Coming Soon Page plugin and the Genesis theme.

    I am using IP address with domain mapping, not cname.

    When I browse directly to a site http://MyDomainName.server.host.com it resolves quickly. When I instead, after editing the A record on the MyDomainName DNS to be the IP of the server, browse to http://www.MyDomainName.com there is a 10 second difference in performance. 3 seconds for direct and 13 for domain mapped.

    Using the Ultimate Coming Soon Page plugin, when active any of my domains resolve to a placeholder page. This also uses the Domain Mapping plugin but then resolves very quickly.

    I am frustrated and confused as the experience seems to indicate that either the backend is slow or domain mapping is slow, but the results (to me at least) seem to be in conflict. If domain mapping were slow then why would it resolve quickly to the placeholder page AND if the backend were slow and it was the domain mapping plugin causing the issue, why would the direct and full URL resolve so quickly?

    Admittedly I'm a bit of a newbie when it comes to wordpress multisite on linux and this is likely something I've done wrong or incompletely, but I've invested a ton of time trying different approaches and am not getting anywhere. Any help would be appreciated. Thank you in advance.

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    IP Address vs CNAME is DNS and which you use has no affect on the plugin ( DNS is for getting the request directed to your WP installl.)

    You can use nslookup on your computer command line to see how long the DNS lookup takes for your WP install (main site domain) & then one of the mapped domains.

    Once the request gets to your WP install there is no significant difference in how long the request takes to process between the unmapped site & mapped domain. If the DNS lookup above is roughly the same amount of time then try turning all you plugins off and see how long each request takes.

  3. tc_s1
    Member
    Posted 1 year ago #

    Thank you for the response. I am aware that 'DNS is DNS' per se, but as I have no prior experience with this plugin, wasn't sure if there was perhaps any difference or experience out there with configuring one over the other in the plugin.

    I used NSLookup both on the server via SSH and via client machines on different networks. All results resolve instantly (both MyDomainName.server.host.com and MyDomainName.com as well as just server.host.com) from all locations.

    When I turn all plugins off and try to run an NSLookup on MyDomainName.com and on MyDomainName.server.host.com I get the same results as when the plugins were on, but when running a PING on MyDomain.com I receive a request timed out (expected with domain mapping plugin off).

    I'm not really sure what this has proven other than the server's friendly name, MyDomain.com, isn't reachable with the plugin off unless going to it via MyDomainName.server.host.com (which also was expected).

    Any further advice as to what may be the source of this issue?

  4. tc_s1
    Member
    Posted 1 year ago #

    PS - should have noted that with all plugins OFF there is also a huge speed improvement in resolving the domain name going to MyDomainName.com (PING was the wrong thing to outline above and I apologize b/c I likely confused the issue by throwing that into the mix).

    So essentially I now, with all plugins off (including MU Domain Mapping) am now able to reach via browser both the MyDomainName.server.host.com AND and http://www.MyDomainName.com at about the same speed, both FAST. I am a bit confused as to how this is working with the plugin network deactivated though, as i thought is was necessary for these to resolve?

  5. tc_s1
    Member
    Posted 1 year ago #

    I reactivated the WordPress MU Domain Mapping plugin on only one site as a test. It is now resolving all pages and assets as http://www.MyDomainName.com/pagename again, however it is back to being REALLY slow (~13 seconds again). Other sites resolve quickly (where the plugin isn't active), but they don't resolve in the proper format of course, as noted above. I don't know what could be causing this. Suggestions?

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    I used NSLookup both on the server via SSH and via client machines on different networks.

    You need to use nslookup on the computer where you are seeing the time difference vs on the server.

    If you have access to SSH on the server you could do a test with wget of both urls and that will give you a sense of how long the lookup part takes.

    but when running a PING on MyDomain.com I receive a request timed out (expected with domain mapping plugin off).

    A ping should work regardless of whether the DM plugin is active or not. Pings are not processed by the webserver software (apache, nginx, etc.) and work fine even when there is no webserver running on the machine.

    Based on the above I'd suggest you contact your hosting support regarding your configuration.

  7. nicosFR
    Member
    Posted 1 year ago #

    Same performance problems with WPMU Domain mapping plugin and W3 Total Cache activated... I'll write to WPMUDEV support if there is a way to have a WP cache plugin AND the domain mapping working fast together !

  8. nicosFR
    Member
    Posted 1 year ago #

    Ok, nevermind, I wasn't using the WPMUDev Domain mapping plugin. I'll test with this one and see if it fixes the issue.

  9. nicosFR
    Member
    Posted 1 year ago #

    Ok, same problem with the WPMUDEV domain mapping plugin associated to a cache plugin...

  10. Johanhorak
    Member
    Posted 11 months ago #

    Deleted

  11. scald
    Member
    Posted 9 months ago #

    I'm facing the same issue, but I think I'm closer to nailing down exactly why. So initially my MU setup was on an ip, and domain mapping was setup to use this IP. Then, I changed the WP siteurl to a domain, and only have had problems with mapped sites since. Sites that don't have domain mapping work fine.

    I noticed in the "network" tab of Chrome one particular request was holding everything up: a call to http://ip-address/?dm=daf25604da5c1e4b34a2f5ce3f1a7b30&action=load&blogid=7&siteid=1&t=331431286&back=http%3A%2F%2Fsitename.net%2F

    Once that request times out the site loads properly -- but after 10-15 seconds.

    I figured it was a WordPress issue, and the IP was hanging around somewhere in the db, but I have changed every possible value in the tables that refers to the siteurl / domain.

    Then it dawned on me that "?dm=..." is likely a domain mapping call, but I am at a loss as to where it is pulling this IP from.

    Any ideas?

  12. scald
    Member
    Posted 9 months ago #

    I should also mention that I changed the domain mapping from IP to CNAME when I changed the siteurl.

  13. scald
    Member
    Posted 9 months ago #

    It appears the call I was seeing originates in line 769 of the plugin:

    function remote_login_js_loader() {
    	global $current_site, $current_blog;
    
    	if ( 0 == get_site_option( 'dm_remote_login' ) || is_user_logged_in() )
    		return false;
    
    	$protocol = is_ssl() ? 'https://' : 'http://';
    	$hash = get_dm_hash();
    	echo "<script src='{$protocol}{$current_site->domain}{$current_site->path}?dm={$hash}&action=load&blogid={$current_blog->blog_id}&siteid={$current_blog->site_id}&t=" . mt_rand() . "&back=" . urlencode( $protocol . $current_blog->domain . $_SERVER[ 'REQUEST_URI' ] ) . "' type='text/javascript'></script>";
    }

    I disabled Remote Login, cleared my caches in W3 Total Cache, and things seem to be back to normal. I can't get it to occur after re-enabling Remote Login, so hopefully it won't rear its head again...

  14. charliebrimm
    Member
    Posted 8 months ago #

    @scald I am experiencing slowness on mapped domains as well. In the network tab I am not seeing that link using an ip in chrome. In the admin it will not save state on the remote login box.

    When I echo get_site_option( 'dm_ipaddress' ) I get an the correct ip

    Echoing get_site_option( 'dm_remote_login') displays 0

    Strange stuff here. Main blog loads quickly but mapped domains take 10s or so.

    I am not using any caching plugins

  15. mortydot
    Member
    Posted 2 months ago #

    My problem whas that domain_mapping.php in both plugin and mu-plugins whas located (copied not moved the file). Removing it from plugins folder fixed the problem

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic