Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8058599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:24:34+00:00 2026-06-05T09:24:34+00:00

we recently have put Varnish in front of our Drupal because the server was

  • 0

we recently have put Varnish in front of our Drupal because the server was suffering heavy load and we are very pleased in general.

The only problem remaining is that we sometimes have an infinite redirection loop in the cached data. We have found this through our HTTP-Monitoring. We check the front page every minute. The page in the cache sometimes contains the full front page, but with a Location header set, that sends the user to the front page again.

We are not quite sure what could cause this, but also have no clue on how could track this down. Of course, the best way to handle this would be on the drupal side, but we can’t really tell why this does happen.

Is there a way to log the cases when this happens? Or is it possible to detect this in varnish and mark the current cache content as invalid?

Of course, we don’t want to always pass intentional redirects to the origin server, but the ones that would cause an infinite loop.

I hope to hear some ideas how we can further track this down. Many thank in advance for all kinds of hints.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:24:36+00:00Added an answer on June 5, 2026 at 9:24 am

    I have found a workaround for this:

    sub vcl_fetch {
      // Fix a strange problem: HTTP 301 redirects to the same page sometimes go in$
      if (beresp.http.Location == "http://" + req.http.host + req.url) {
        if (req.restarts > 2) {
          unset beresp.http.Location;
          #set beresp.http.X-Restarts = req.restarts;
        } else {
          return (restart);
        }
      }
    }
    

    I give the backend a second (and thirhd) chance to return a proper page. If that fails as well, the Location header is removed. This works, because the proper page is served with just an additional invalid Location header.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently got a new computer and I have put Eclipse Helios on
Alright so I have recently made the decision to put every string in my
Possible Duplicate: file_put_contents permission denied I have recently transferred server, and it seems that
I've recently have taken a new server under my wing that has an interesting
I have recently been asked to help put together an Android App, mostly UI
Recently I have found some classes in our system which are not covered by
I have recently been put in charge of debugging two different programs which will
I have recently started programming android apps (put simply, i have next to no
I have recently put out a tweet on my twitter account, and it was
Recently I have been looking into Cassandra from our new project's perspective and learned

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.