Maxim Dounin
May 03, 2013 06:02PM
Hello!

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
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

[crit] 16665#0 unlink()

nano May 03, 2013 04:17PM

Re: [crit] 16665#0 unlink()

Maxim Dounin May 03, 2013 06:02PM

Re: [crit] 16665#0 unlink()

nano May 03, 2013 07:49PM

Re: [crit] 16665#0 unlink()

Jim Ohlstein May 04, 2013 07:10PM

Re: [crit] 16665#0 unlink()

Maxim Dounin May 05, 2013 04:34PM

Re: [crit] 16665#0 unlink()

Jim Ohlstein May 06, 2013 09:04AM

Re: [crit] 16665#0 unlink()

Maxim Dounin May 06, 2013 09:56AM

Re: [crit] 16665#0 unlink()

Jim Ohlstein May 06, 2013 10:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 204
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