We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config:
# run with nginx -p . -c nginx.conf daemon off; worker_processes 1; pid nginx.pid; events { use epoll; worker_connections 2000; } error_log stderr; http { slowfs_cache_path tmpfs/cache levels=1:2 keys_zone=memcache:100m inactive=1h max_size=100M; slowfs_temp_path tmpfs/tmp 1 2; access_log /dev/stdout; open_file_cache max=100; server { listen 8010; location / { root /path/to/files; slowfs_cache memcache; slowfs_cache_key $uri; slowfs_cache_valid 1m; slowfs_cache_min_uses 1; slowfs_big_file_size 128k; } }
two files in /path/to/files:
$ ls -l -rw-rw-r-- 1 yura yura 96432450 окт. 12 12:22 aaaa1.txt -rw-rw-r-- 1 yura yura 96432450 окт. 12 11:54 aaaa.txt
request first file, then second, wait till cache file for first file disappeared and request first file again
$ curl 'http://localhost:8010/aaaa.txt' > /dev/null $ curl 'http://localhost:8010/aaaa1.txt' > /dev/null $ # wait here till cache for aaaa.txt disappeared $ curl 'http://localhost:8010/aaaa.txt' > /dev/null
nginx put in his log (in stdout with this config):
127.0.0.1 - - [12/Oct/2012:15:37:00 +0400] "GET /aaaa.txt HTTP/1.1" 200 96432450 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3" 127.0.0.1 - - [12/Oct/2012:15:37:05 +0400] "GET /aaaa1.txt HTTP/1.1" 200 96432450 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3" 2012/10/12 15:37:09 [alert] 27573#0: *3 read() has read only 0 of 96432450 bytes (2: No such file or directory) while populating cache, client: 127.0.0.1, server: , request: "GET /aaaa.txt HTTP/1.1", host: "localhost:8010" 2012/10/12 15:37:09 [alert] 27573#0: *3 http file cache copy: "/path/to/files/aaaa.txt" failed (2: No such file or directory) while populating cache, client: 127.0.0.1, server: , request: "GET /aaaa.txt HTTP/1.1", host: "localhost:8010" 127.0.0.1 - - [12/Oct/2012:15:37:09 +0400] "GET /aaaa.txt HTTP/1.1" 200 96432450 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
The text was updated successfully, but these errors were encountered:
works fine for me using nginx 1.2.3
Sorry, something went wrong.
No branches or pull requests
Config:
two files in /path/to/files:
request first file, then second, wait till cache file for first file disappeared and request first file again
nginx put in his log (in stdout with this config):
The text was updated successfully, but these errors were encountered: