Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Cherian Thomas
Thanks for this Michael. This is so surprising. If someone decides to Dos and crawls the website with a rogue header, this will essentially bypass the cache and put a strain on the website. In fact, I was hit by a dos attack that’s when I started looking at logs and realized the large number of

Re: inheritance of proxy_http_version and proxy_set_header

2018-05-12 Thread Joe Doe
Here is the config with some info redacted. The only difference between the mirror that inherited the setting and the ones not is http vs https. For the time being, to get around the issue, the settings to use keep-alive for upstream servers are added to those mirrors. nginx.conf: user nginx; w

Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Friscia, Michael
I'm not sure if this will help, but I ignore/hide a lot, this is in my config proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; proxy_hide_header X-Accel-Expires; proxy_hide_header Pragma; proxy_hide_header Server; proxy_hide_header Request-Context; proxy_hide_header X-Powere

Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Quintin Par
That’s the tricky part. These MISSes are intermittent. Whenever I run curl I get HITs but I end up seeing a lot of MISS in the logs. How do I log these MiSSes with the reason? I want to know what headers ended up bypassing the cache. Here’s my caching config proxy_pass http://1

Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Lucas Rolff
It can be as simple as doing a curl to your “origin” url (the one you proxy_pass to) for the files you see that gets a lot of MISS’s – if there’s odd headers such as cookies etc, then you’ll most likely experience a bad cache if your nginx is configured to not ignore those headers. From: nginx

Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Quintin Par
My proxy cache path is set to a very high size proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=staticfilecache:180m max_size=700m; and the size used is only sudo du -sh * 14M cache 4.0Kproxy Proxy cache valid is set to proxy_cache_valid 200 120d; I track HIT and MISS via add_