caching – Where are the nginx cache temp files stored?

We’re looking into some unexpected behavior from our nginx reverse proxy and in our logs we’re seeing the following message:

2023/10/16 19:17:28 [warn] 37#37: *1 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/1/00/0000000001 while reading upstream, client: 172.18.0.1, server: <a server>, request: "GET /test/download HTTP/1.1", upstream: "http://192.168.65.2:8181/test/download", host: "<our host>" 

However, when we go to /var/cache/nginx/proxy_temp/ there are no files, just empty directories:

/var/cache/nginx/proxy_temp # ls
0  1  2  3  4  5  6  7  8  9

and each of the directories list above is empty

To dig in deeper, we wrote a test client and server. The server just responds with a 500MB file and the client is throttled reading the 500MB response (to simulate slower clients). We put a pretty long sleep in reading the response to give us time to poke around the file system on the nginx container but we couldn’t find anything. We also see the container has a decent amount of Disk Writing, but we can’t find where it’s to.

Read more here: Source link