Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly Cache clear breaks redirects #31

Open
nhorvat123 opened this issue Feb 27, 2017 · 13 comments
Open

Nightly Cache clear breaks redirects #31

nhorvat123 opened this issue Feb 27, 2017 · 13 comments
Assignees

Comments

@nhorvat123
Copy link

In our Sitecore environment (version 7.2), we have one CMS server, and two CD servers (one for QA and one for Production) with two web servers for each environment. When I create the redirects and publish them to their respective targets, they work perfectly fine.

The issue arises when it looks like the Sitecore cache is clearing each night. On the CMS server's URL Rewrite logs, it looks like it is adding the redirects to the cache, and when I go to the cache admin screen, I can see that the cache looks like it has been built properly. When I look at the web server's URL rewrite logs, the redirects are not being added to the cache.

The following things will allow the redirects to start working again:

  1. Unpublishing and republishing the redirects to the CD servers.
  2. Restarting the site in IIS
  3. Recycling the App Pool for the website

After unpublishing and republishing the redirects, I can go to the web server's URL Rewrite logs and see the inbound rules being refreshed in the cache.

Any idea what could be going on and how I can fix this?

@iamandycohen
Copy link
Owner

Why is the cache getting cleared every night? Is that a custom clearer that you built?

@nhorvat123
Copy link
Author

I am not 100% certain that is what is actually happening, but it was all I could see. I looked into Sitecore caches and it looks like all of our settings in the site's web.config are pretty standard.

This is what I am seeing in our logs and what made me believe that the cache was getting cleared and rebuilt:

image

@iamandycohen
Copy link
Owner

What version of the module?

@nhorvat123
Copy link
Author

I installed version 1.7.2 of the module, assuming that corresponded with version 7.2 of Sitecore.

The CMS server look fine for the morning builds:

image

So it seems like it is something on the web servers that is not building the caches appropriately.

@iamandycohen
Copy link
Owner

Can you send me the assembly? iamandycohen at gmail dot com

@nhorvat123
Copy link
Author

I sent it over this morning. Let me know if you got it or if you need anything else.

@nhorvat123
Copy link
Author

URL.Rewrite-1.7.2.zip

@iamandycohen
Copy link
Owner

iamandycohen commented Mar 3, 2017 via email

@iamandycohen
Copy link
Owner

Please try replacing the Hi.UrlRewrite.dll assembly. If this works, then I will commit the code.

Hi.UrlRewrite.zip

@iamandycohen
Copy link
Owner

iamandycohen commented Mar 16, 2017

My bad... that code didn't even execute the ExecuteResult call that performed the redirect.

Please try this code, and follow these instructions:

  1. Start sitecore
  2. Hit a url that should redirect
  3. Verify that it redirects
  4. Clear the cache using the Cache Admin tool
  5. Hit the same url that should redirect
  6. Verify that it redirects

This should illustrate the same functionality as waiting over night.

If this works for you, then I will commit my code and upload a new package for all!

Hi.UrlRewrite.zip

@iamandycohen
Copy link
Owner

What happened after you manually cleared the cache with this patch?

@iamandycohen iamandycohen self-assigned this Mar 19, 2017
@nhorvat123
Copy link
Author

After I manually cleared the Sitecore cache, the redirects still did work, so that definitely helped!

@mstodd
Copy link

mstodd commented Aug 30, 2018

This isn't working for me.
After unzipping the zip from March 16 and putting the files in my site's bin, if I:
Create a redirect
Test it successfully
Clear cache
Test again

The second test doesn't work

Re-saving the redirect gets it to work again
This is with Sitecore.NET 7.5 (rev. 141003) and redirect 1.7.2 + March 16 patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants