The MU forums have moved to WordPress.org

WPMU slow page load with subdomains (3 posts)

  1. cankita
    Member
    Posted 15 years ago #

    I am trying to resolve a slow page loading problem with WPMU which has been raised on other threads but has never been resolved. The delay occurs in the initial GET request (taking around 60 seconds) so I'd like to understand just how WPMU deals with subdomains. There doesn't seem to be any documentation on this but my understanding from various sources is that it's something like this

    1. Wildcard subdomains are set on the server

    2. When a request comes in the server doesn't recognise the subdomain so sends the request to the location of the main domain (WPMU folder)

    3. htaccess in the WPMU directory rewrites the URL to a form that can match with the database

    4. WPMU searches through at table (either wp_signups or wp_blogs) to find a match to the subdomain

    5. WPMU redirects to the tables for the blog found and serves the appropriate pages

    Can anyone confirm (or amend) that is what happens so that I can try to determine the stage at which the load delay is occurring?

    Once I understand the load process I'll come back with more specific observations so that we might finally crack a problem that seems to affect many users.

  2. lunabyte
    Member
    Posted 15 years ago #

    Not quite accurate, but kinda close.

    - Request comes into server, as it's been pointed to it by DNS.

    - Server observes domain, recognizes it as being a part of virtual host X (This is because of the wildcard subdomain, so yes it does recognize where it routes to.)

    - htaccess makes sure the request isn't a legitimate file or directory, passes the request to index.php if it's not.

    - MU takes note if it's in subdomain or subdir mode.

    - MU looks up (in general, it's now defined in the config file too) to define the "current site"

    - MU looks up the current blog request, if it exists, it serves it. If not, it will use NOBLOGREDIRECT if defined, or redirect to the signup page.

  3. cankita
    Member
    Posted 15 years ago #

    For anyone who might be suffering from the slow page load problem I finally tracked it down to a php timeout but was unable to discover what was causing it. I ended up transferring the site to another host where (so far) the problem has not re-appeared.

About this Topic