Proxying setup delivering wrong cache entry in some edge cases

benzimmer nginx-forum at
Mon Oct 15 18:23:09 UTC 2018

We've been using Nginx as a caching proxy for quite a while in different
scenarios now. Since a few weeks and especially in the last couple of days
we continue to encounter a strange behaviour in one of our scenarios leading
to wrong content being delivered.

In that case we use Nginx as a caching proxy for a bunch of subdomains on a
kind of multitenancy application. We established the setup 4 months ago and
never had any problems until recently.

For example, a request to would deliver
the content for So basically it delivers
content for the wrong subdomain. Those occasions are very, very rare and
totally random in regards to the subdomain from which the content gets

We currently use openresty

Our config is quite large, so I will put it into a gist if that's OK:

This seems to be working fine for the most part, but every now and then we
see the described behaviour without being able to consistently reproduce

If anyone has any clue why this might be happening, we'd be very grateful.
If you need any additional information, please feel free to ask away!

Posted at Nginx Forum:,281606,281606#msg-281606

More information about the nginx mailing list