Jump to content
quickjeff

Strange Cache Issue after Migration

Recommended Posts

Hi Guys, 

I wanted to reach to everyone in the community to see if someone has come across this issue. 

We have a client that had a website built in PHP. 

We provided our client with a new website built on ProcessWire.

Our client has their domain name registered  with register.com and their old website was built by another developer who was hosting the website in a virtual server at gandi.net.  

The DNS settings were as follows:

Domain name was pointed to the gandi.net in order to display the website files. 

The MX records were pointed to Google servers for company emails. 

The Name servers were as is which is the stock register.com name servers.

We were not able to speak with the old developer to setup a time to update the files so we were asked by our client to move forward without contacting the old developer.

How we setup the new website:

In order to avoid down time of the email accounts and not having to setup new MX records on another host, we simply setup our clients new website on GoDaddy shared hosting and changed the A record in their register.com DNS settings to point to the new hosting account. Basically, an IP change. Everything else they had stayed the same, meaning we did not change the MX records and we did not change the name servers.

Here is the issue:

Some website visitors are seeing the new website, some are seeing the old website.  We first thought it was due to browser caching or the propagation did not fully complete when they tried to visit the website.  After telling our client to wait until the new DNS settings or try to clear their cache, we thought they were all good to go. 

Now our client is contacting us saying that the issue is still happening. So we contacted register.com and had them resubmit the new DNS settings again, basically the same IP change we did.  

Result:

Some users are still seeing the old website on certain routers. We are also seeing the old website on certain routers we use and the new site on other routers. 

Can anyone provide some guidance? Has anyone seen this issue before?

We even pinged the website and it shows the correct server, we also used whatsmydns.net to see what the site is coming up as across the world and we also see the correct server. Lastly, we sent the url to our partners in Germany and they see the new website and not the old one. 

This is honestly the oddest issue I have seen and unsure as to why this is going on?

Here is our clients site:

medstarlab.com

Share this post


Link to post
Share on other sites

The only thing I would recommend is to flush the DNS cache for that domain.

  • Like 1

Share this post


Link to post
Share on other sites

@cstevensjr - I have flushed my system DNS cache, cleared my browser history etc. I am beginning to think that this is an ISP issue. 

Its very odd, I can see the new website when I connect to a hot spot, I can see the old site when I connect to my home office internet. 

Share this post


Link to post
Share on other sites

Dns is strange. I've seen this before. In the end (after a week) it was solved, but I have no clue why it took so long.

1. When did you change the A record for the first time?

2. When did you change it for the second time? 

3. I've noticed that both www and non-www are loaded separately. Perhaps the www subdomain was changed later on? You can change the .htaccess so traffic is directed to either www or non-www.

I always use http://dns.squish.net/ to determine if the DNS is setup correctly ( medstarlab.com resolves to 192.186.217.98).

  • Like 1

Share this post


Link to post
Share on other sites

Sorry, I wasn't very detailed.  

i actually meant you or the hosting provider (ISP) needs to flush the DNS cache from the cPanel (or it's equivalent).  On some hosting providers, you can do it yourself (i.e. DreamHost).  Normal DNS propagation takes at least 72 hours or longer.  It all depends on where the actual server is located, that's why some see the website where it's been moved to and others still see the old DNS information.  There are times where due to traffic congestion or other router issues, the updated information doesn't make it everywhere (across the world) in a timely manner.

Flushing the DNS cache will restart the process and usually things will start working as required.  You are correct that you need to work with the hosting provider (ISP) to clear this up.  GoDaddy support should have been on top of this, since they are hosting the website now.  Please open a trouble ticket with them and good luck.

  • Like 2

Share this post


Link to post
Share on other sites

@arjen

1.) The first time it was changed was 3 weeks ago.

2.) The second time it was changed 4 days ago.

3.) Correct, it was changed after. I can adjust the htacess. 

In regards to the DNS, medstarlab.com should resolve to 192.186.217.98 which is where its hosted now but sometimes I will see the old website (Only when I connect to the internet on my home router, which is Comcast Xfinity Internet.) I can see the new site when I connect to something else for data.

@cstevenjr

In regards to flushing the DNS, GoDaddy can see the new website, Register.com which is where the domain name is can also see the new website, when we ping the website url, we get the right IP for the right server.  :'(

Share this post


Link to post
Share on other sites

@cstevenjr

In regards to flushing the DNS, GoDaddy can see the new website, Register.com which is where the domain name is can also see the new website, when we ping the website url, we get the right IP for the right server.  :'(

Of course GoDaddy can see the website (it's local to them, they pushed or received the DNS change, they have multiple high capacity links and the affected website is at one of their facilities).  Of course register.com can see the website (they pushed or received the DNS change and have multiple high capacity links).

Other people (your users throughout the world) won't see the new website until the probable DNS propagation issue is resolved.  That's the most likely situation for this issue, however it's still most likely a hosting provider (ISP) problem and there could be other configuration issues.

The propagation of DNS information could be affected by many reasons (for the users who cannot see the new website).

  • Like 1

Share this post


Link to post
Share on other sites

post-756-0-46973400-1443797752_thumb.png

From Southern California (via Time Warner Internet link)

post-756-0-17115100-1443798486_thumb.png

From Southern California (via AT&T Internet Link)

As an aside, hopefully your customers aren't getting your website confused with this one

post-756-0-25677000-1443798523_thumb.png

which is medstarlabs.com versus medstarlab.com

Best Regards,

Charles

  • Like 3

Share this post


Link to post
Share on other sites

@cstevensjr - Thanks for the screen shot. 

This really boggles my mind.

I havent seen something like this, we might resort to finally pointing the Nameservers to our hosting and setting up their MX records. 

Share this post


Link to post
Share on other sites

All, think we figured it out. 

There was one iPv6 Setting pointing to the old domain. We deleted this record, now we see the new site all the time. 

Its good to have an extra set of eyes on something, thanks to all that helped on this. 

  • Like 2

Share this post


Link to post
Share on other sites

Glad to hear you sorted it out. Dns can be frustrating at times.

Share this post


Link to post
Share on other sites

@arjen 

Yes indeed. We are still waiting for it to fully propagate , can you screen shot what you see?

Share this post


Link to post
Share on other sites

@Christophe, thanks for the update! Seems like the solution is working. I don't wan to Jinx it haha. 

I will report back the status after today.

Share this post


Link to post
Share on other sites

I'm seeing the new one too.

Share this post


Link to post
Share on other sites

I'm seeing the new one too.

also here!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MoritzLost
      Cacheable Placeholders
      This module allows you to have pieces of dynamic content inside cached output. This aims to solve the common problem of having a mostly cacheable site, but with pieces of dynamic output here and there.  Consider this simple example, where you want to output a custom greeting to the current user:
      <h1>Good morning, <?= ucfirst($user->name) ?></h1> This snippet means you can't use the template cache (at least for logged-in users), because each user has a different name. Even if 99% of your output is static, you can only cache the pieces that you know won't include this personal greeting. A more common example would be CSRF tokens for HTML forms - those need to be unique by definition, so you can't cache the form wholesale.
      This module solves this problem by introducing cacheable placeholders - small placeholder tokens that get replaced during every request. The replacement is done inside a Page::render hook so it runs during every request, even if the response is served from the template cache. So you can use something like this:
      <h1>Good morning, {{{greeting}}}</h1> Replacement tokens are defined with a callback function that produces the appropriate output and added to the module through a simple hook:
      // site/ready.php wire()->addHookAfter('CachePlaceholders::getTokens', function (HookEvent $e) { $tokens = $e->return; $tokens['greeting'] = [ 'callback' => function (array $tokenData) { return ucfirst(wire('user')->name); } ]; $e->return = $tokens; }); Tokens can also include parameters that are parsed and passed to the callback function. There are more fully annotated examples and step-by-step instructions in the README on Github!
      Features
      A simple and fast token parser that calls the appropriate callback and runs automatically. Tokens may include multiple named or positional parameters, as well as multi-value parameters. A manual mode that allows you to replace tokens in custom pieces of cached content (useful if you're using the $cache API). Some built-in tokens for common use-cases: CSRF-Tokens, replacing values from superglobals and producing random hexadecimal strings. The token format is completely customizable, all delimiters can be changed to avoid collisions with existing tag parsers or template languages. Links
      Github Repository & documentation Module directory If you are interested in learning more, the README is very extensive, with more usage examples, code samples and usage instructions!
    • By MoritzLost
      Process Cache Control
      This module provides a simple solution to clearing all your cache layers at once, and an extensible interface to perform various cache-related actions.
      The simple motivation behind this module was that I was tired of manually clearing caches in several places after deploying a change on a live site. The basic purpose of this module is a simple Clear all caches link in the Setup menu which clears out all caches, no matter where they hide. You can customize what exactly the module does through it's configuration menu:
      Expire or delete all cache entries in the database, or selectively clear caches by namespace ($cache API) Clear the the template render cache. Clear out specific folders inside your site's cache directory (/site/assets/cache) Clear the ProCache page render cache (if your site is using ProCache) Refresh version strings for static assets to bust client-side browser caches (this requires some setup, see the full documentation for details). This is the basic function of the module. However, you can also add different cache management action through the API and execute them through the module's interface. For this advanced usage, the module provides:
      An interface to see all available cache actions and execute them. A system log and logging output on the module page to see verify what the module is doing. A CacheControlTools class with utility functions to clear out different caches. An API to add cache actions, execute them programmatically and even modify the default action. Permission management, allowing you granular control over which user roles can execute which actions. The complete documentation can be found in the module's README.
      Plans for improvements
      If there is some interest in this, I plan to expand this to a more general cache management solution. I particular, I would like to add additional cache actions. Some ideas that came to mind:
      Warming up the template render cache for publicly accessible pages. Removing all active user sessions. Let me know if you have more suggestions!
      Links
      https://github.com/MoritzLost/ProcessCacheControl ProcessCacheControl in the Module directory CHANGELOG in the repository Screenshots


    • By gebeer
      Hello all,
      wasn't sure where to put this, so it goes in General section.
      Ryan shows a hook that we can use to mirror files on demand from live server to development environment to be up to date with the files on the server without having to download complete site/assets/files folder.
      I just implemented this but had problems getting files to load from a site in development that is secured with user/password via htaccess.
      First I tried to use WireHttp setHeader method for basic authentication like this
      function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $url = str_replace($config->paths->files, $src, $file); $http = new WireHttp(); // basic authentication $u = 'myuser'; $pw = 'mypassword'; $http->setHeader('Authorization: Basic', base64_encode("$u:$pw")); $http->download($url, $file); } } But, unfortunately this didn't work.
      So now I am using curl to do the download. My hook function now looks like this
      function mirrorFilesfromLiveServer(HookEvent $event) { $config = $event->wire('config'); $file = $event->return; if ($event->method == 'url') { // convert url to disk path $file = $config->paths->root . substr($file, strlen($config->urls->root)); } if (!file_exists($file)) { // download file from source if it doesn't exist here $src = 'http://mydomain.com/site/assets/files/'; $fp = fopen($file, 'w+'); // init file pointer $url = str_replace($config->paths->files, $src, $file); $u = 'myuser'; $pw = 'mypassword'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 50); // crazy high timeout just in case there are very large files curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "$u:$pw"); // authentication curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); // authentication curl_setopt($ch, CURLOPT_FILE, $fp); // give curl the file pointer so that it can write to it curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); curl_close($ch); } } Now I can load files and images from the htaccess protected development server 🙂
      If anyone knows how to get this to work with WireHttp, please let me know. Thank you.
    • By verdeandrea
      Hello,
      I am using ProCache v3.1.8 on ProcessWire 3.0.96.
      Everything worked fine in the past, but today I noticed that the css file serverd by procache gives a 410 error. 
      The file is there, I checked.
      I deleted the cached files, I deleted the css file, I looked into the .htaccess file looking for some clues about this problem but nothing worked.
      The only way i can see my website correctly again is disabling ProCache. 
      Has anyone any clue on what could be the cause of the problem or on what should I do to fix it?
      Thanks!
    • By abdulqayyum
      Hy Processwire community,
      There are some problem in fileCompiler cache.
      when i change under the directory \site\templates\ it must change under the directory /site/assets/cache/FileCompiler/site/templates/
      but it does not update and functionality working with /site/assets/cache/FileCompiler/site/templates/ directory.
       
      In this case please suggest me how i clear fileCompiler cache?
      what i have to clear it manually?
      Thanks AbdulQayyum.
×
×
  • Create New...