On our site, we have a large number of redirects to stuff on other sites using the redirect module. Since the expire module adds those urls to the list of entries to expire, purge gets the list when it implements hook_expire_cache and tries to purge them from varnish. However, these urls aren't stored in varnish because they are redirects. The symptoms as we see it are a large number of 404s in our watch dog logs.

CommentFileSizeAuthor
#1 purge-redirect404Errors-1751110-1.patch461 bytesheddn

Comments

heddn’s picture

StatusFileSize
new461 bytes

testing still needed on a more production like environment than just my local workstation. that comes next...

SqyD’s picture

Status: Active » Postponed (maintainer needs more info)

Thank you for your bug report. Not sure if I understand you correctly since I don't know the redirect module. Could you help me clarify?
- Varnish can and will cache redirects, so purging/banning them might be useful in other cases.
- Your patch seems a rather blunt workaround that may (or may not) have unintended side effects.
- Wouldn't it be a more elegant solution to make expire aware of the redirect module and have an option to exclude those url's from the expire logic before they are handed over to purge?

Like your said this case would require more testing which I unfortunately don't have too much time for lately but I would like to help you out if you could gather some more info and test results.

heddn’s picture

I'm doing more research today with a fresh set of eyes. I'm not so sure that the patch is needed... I'm thinking it is an issue with how expire.module is sending down the hostnames. It seems to be tacking together the path and the hostname. So, instead of http://www.example.com/location, it is a url of http://www.example.comlocation.

heddn’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)