Welcome! Log In Create A New Profile

Advanced

Re: uwsgi_cache only caching root location

August 15, 2015 07:22PM
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
Subject Author Posted

uwsgi_cache only caching root location

daveyfx August 15, 2015 02:50PM

Re: uwsgi_cache only caching root location

Francis Daly August 15, 2015 05:24PM

Re: uwsgi_cache only caching root location

daveyfx August 15, 2015 07:22PM

Re: uwsgi_cache only caching root location

daveyfx August 15, 2015 09:16PM

Re: uwsgi_cache only caching root location

daveyfx August 16, 2015 01:16AM

Re: uwsgi_cache only caching root location

Francis Daly August 16, 2015 02:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 101
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready