[crit] 16665#0 unlink()

Maxim Dounin mdounin at mdounin.ru
Fri May 3 22:01:11 UTC 2013


On Fri, May 03, 2013 at 04:17:17PM -0400, nano wrote:

> 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.


> 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;

You've configured two distinct caches to use single directory.  
This is not how it's expected to work.

You should use distinct directories for each cache you configure.  
If you want different locations to use the same cache - just use 
the same cache in the proxy_cache directive.


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

It's ok to use the same cache for different locations/servers.  
But it's really bad idea to configure multiple caches in the same 
directory, and this is what causes your problems.

Maxim Dounin

More information about the nginx mailing list