uwsgi_cache only caching root location

daveyfx nginx-forum at nginx.us
Sat Aug 15 23:22:56 UTC 2015


Hi Francis -

In the uwsgi logs for my Python application, I see in the request logs:

[pid: 15085|app: 0|req: 25/81] 38.103.38.200 () {32 vars in 503 bytes} [Sat
Aug 15 22:22:08 2015] GET /congress?mref=nav => generated 108292 bytes in 66
msecs (HTTP/1.1 200) 4 headers in 166 bytes (3 switches on core 0)


I have my apps servers on the upstream configured to use uwsgi protocol (for
use with uwsgi pass in nginx) and decided to see what would happen if I
switched to http for the app, and configure nginx to use proxy_ directives
in lieu of all the uwsgi_ directives.  Strangely, this still did not fix the
caching issue.

Here's the output of the tcpdump on my apps node, still with http protocol
used instead of uwsgi.

GET /congress?mref=nav HTTP/1.1
Host: origin.xxxx.com
X-Real-IP: xxx.xxx.xxx.xxx
X-Forwarded-For: xxx.xxx.xxx.xxx
Authorization: Basic REZQMTphZHRlc3Q=
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=utf-8
Set-Cookie:  obj_id=1732; Path=/
Set-Cookie:  landing_type=pub_chan; Path=/

Just to test, I even set proxy_cache_valid to "any" and still only the home
page will cache.  Also commented out the proxy_no_cache directive in my
location / block and strangely, the issue persists.

Thank you,
Dave

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261033,261035#msg-261035



More information about the nginx mailing list