Production site error: One time content load from new registered blog.

The issue
After new registration the first visit on any existing blog will partly load content from the newly registered blog. The second visit on that same existing blog doesn’t see this strange behavior. Or after a refresh the blog will reload everything properly.

We have about 20 registrations a day, with 5000 blogs means that this glitch occurs about 10.000 times a day. Also this kind of behavior brings big trust issues to our users, although as far as I can see there is no security risk.

With partial load I mean that following information will be loaded into the existing blogs:
Loaded from existing blog
- All CSS and scripts will link to the correct URL
Loaded from newly registered blog
- All content; menu, posts, images, widgets
- All links will go to the new blog (dashboard, posts links, etc.)

To make it a bit more clear I've uploaded a screen recording showing the issue. You can watch the recording here: http://1drv.ms/1zDUQdx

Since when did this issue occur.
We upgraded the site and all plugins to Wordpress 4.0 (about two weeks ago). During the upgrade we also introduced Multi-domain (with domain mapping).

Everything looked fine till new people start registering. We are unable to do a rollback because of all the new content already written.

What we’ve done so far
- Spend a lot of time to get create a use-case to reproduce this issue.
- Disabling all plugins
- Checked the error.log nothing there

What’s next?
That’s a very good question. I have no idea. The one sollution we see now is disabling registration. But this will kill the site if it takes to long to fix.

Please shoot your ideas, I’ll give you all my rep points if you can help me :slight_smile:. Any help is appreciated!

  • Vaughan

    Hi pbrink,

    Can I ask if this is a VPS or dedicated server or shared hosting? i'm guessing it's not shared (or hoping) with 5000 blogs.

    Can you tell me what the PHP memory_limit is on the server?

    Also do you have any cache installed at all?

    Server side cache would be better such as memcache or something rather than a cache plugin, but cache could certainly help here.

    Have you tried cache such as rocket cache or wp fastest cache?

    http://wp-rocket.me/

    https://wordpress.org/plugins/wp-fastest-cache/

    Have you ran a site test to see if there's any problems, using pingdom at all?

    http://tools.pingdom.com/fpt/

    Hope this helps

  • pbrink

    Hi Vaughan,

    Thanks for your reply. The site is hosted on a dedicated server, with 8 GB ram and SSD harddisks. We use Varnish Cache server for caching.

    The issue we need address is not performance (although it has been slow). It's that blogs load the wrong content. As I described on the posts, please watch the recording http://1drv.ms/1zDUQdx. Where you can see that after activating a new blog and then refreshing an existing blog. The existing blog will load the content from the new blog, then after refreshing the existing blog everything goes back to normal. Till the next registration and everything happens again.

    Some additional info (that I'm not sure if it helps):
    - The site has a Multi-DB setup.
    - The error doesn't occur when a existing user adds an additional blog

  • Jack Kitterhing

    Hi there @pbrink,

    Hope you're well today and thanks for the additional information.

    This is certainly a unusual issue, with multi-db have you defined any VIP blogs? If you have, are you using New Blog templates at all?

    As your using Multi-Domains, can you let me know the dedicated server IP.

    Does this issue occur if the site is registered on the main domain or just the multidomains?

    Would you be able to disable Varnish caching for testing purposes?

    Do you use any database side caching such as APC or similar.

    Thanks!

    Kind Regards
    Jack.

  • pbrink

    Hi Jack,

    Thanks for all you help. It's really unusual. You know when you hit the jackpot if you Google and you can't find anyone with similar issues :slight_smile:.

    This is certainly a unusual issue, with multi-db have you defined any VIP blogs? If you have, are you using New Blog templates at all?

    We don't use VIP blogs. We're using the default 256 DB setup. We are use New Blog Templates, but i can reproduce the error with New Blog Templates plugin disabled.

    As your using Multi-Domains, can you let me know the dedicated server IP.

    212.61.68.77 (gaatverweg.nl)

    Does this issue occur if the site is registered on the main domain or just the multidomains?

    I'm not 100% sure if I get your questions. You can only register trough the main website. All registration are user+blog (subdomain). We are using multidomain to support two different toplevel domains. Those top level domains have different meanings in Dutch, but features and main site are the same site.

    For damage control I've made the new toplevel domain private. So if needed I can always disable the new domain name (that will dissapoint the 20 users using it now).

    Would you be able to disable Varnish caching for testing purposes?

    Probably I need to ask my system admistrator.

    Do you use any database side caching such as APC or similar.

    Let me ask my system admistrator.

    For now I created a plugin that checks if the URL subdomain is equal to the wordpress site url (get_site_url()). If not it will redirect to the URL. This hack does the trick for now, but I do need to figure this one out.

  • Jack Kitterhing

    Hi there @pbrink,

    Hope you're well today and thanks for the additional information.

    If you could let me know what your system administrator says.

    Your dedicated IP should point to the root of your multisite install, so when you load the IP in the browser you should get the home page of the main site.

    Instead I get

    Bad Request

    Your browser sent a request that this server could not understand.

    Could you check your server error logs please? :slight_smile:

    Thank you!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.