[crit] 16665#0 unlink()

nano nginx-forum at nginx.us
Fri May 3 20:17:17 UTC 2013


Hello,

I'm using nginx 1.4.0 to proxy a website, and I cache responses. I haven't
noticed any problems on the front end, but the error log has unlink()
errors.

2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/8/9f/42da8f2662887b05cbb46fd5c9dac9f8" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/8/7d/f16e1a9cee13b3a9852fff331491d7d8" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/d/96/2b1e341ee2ccd315643dcad397b9796d" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/6/87/c3324c5f79272b6fff64ac19be2d0876" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/c/ae/aa5ee91c36f7ab931251dd125a200aec" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/c/d8/2ac585aa18ec25e3a8eab19b096dcd8c" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/2/94/77170f4b850dcc5bae0e93bdf0f07942" failed (2: No
such file or directory)
2013/05/03 12:53:42 [crit] 16665#0: unlink()
"/usr/local/nginx/cache/3/cd/f92020ab245f9be3bab04cf8bf93acd3" failed (2: No
such file or directory)

The list goes on.

Is this something to be concerned of?

My configuration is psuedo but here is the main parts:

    #reverse ssl (usage not shown in examples)
    proxy_cache_path    /usr/local/nginx/cache  levels=1:2
keys_zone=static-files:10m inactive=24h max_size=1g;
    
    #main site cache
    proxy_cache_path    /usr/local/nginx/cache  levels=1:2
keys_zone=page-cache:10m inactive=24h max_size=1g;

    #main site
    location / {
            proxy_http_version 1.0;
            proxy_set_header Accept-Encoding "";
            proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
            proxy_set_header Host *********;
            proxy_ignore_headers Set-Cookie;
            proxy_ignore_headers Cache-Control;
            proxy_cache page-cache;
            proxy_cache_key $scheme$proxy_host$request_uri;
            proxy_cache_valid  200  30m;
            proxy_cache_valid  404  1m;
            proxy_intercept_errors on;
            proxy_cache_use_stale error timeout invalid_header updating
http_502 http_500 http_503 http_504;
            add_header X-Cache $upstream_cache_status;
            proxy_pass *********;
    }

    #sub domain 
    location / {
            proxy_http_version 1.0;
            proxy_set_header Accept-Encoding "";
            proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
            proxy_set_header Host *********;
            proxy_ignore_headers Set-Cookie;
            proxy_ignore_headers Cache-Control;
            proxy_cache page-cache;
            proxy_cache_key $scheme$proxy_host$request_uri;
            proxy_cache_valid  200  30m;
            proxy_cache_valid  404  1m;
            proxy_intercept_errors on;
            proxy_cache_use_stale error timeout invalid_header updating
http_502 http_500 http_503 http_504;
            add_header X-Cache $upstream_cache_status;
            proxy_pass *********;
    }


Is this bad practice to share caches among subdomains? Is sharing the cache
the reason why I'm getting unlink() errors?

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



More information about the nginx mailing list