Forum: NGINX proxy_cache and restarts

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Resicow (Guest)
on 2009-05-02 21:05
(Received via mailing list)
Hello,

I have a question on for nginx handles restarts and proxy_cache.

Say I have 2 million objects cached, taking up 50GBs of space. Then I
get a kernel panic or some other error, and have to restart the physical
machine.

When I start nginx up again the 2 million objects are still on the disk,
but nginx no longer has its internal caching table, correct? Are those
files just stuck on the disk forever, or do I need to ensure the cache
is empty if nginx needs to be restarted by manually deleting the
objects?

Also on binary upgrades, will the internal proxy cache table survive?

Thanks,

John
Igor S. (Guest)
on 2009-05-02 21:17
(Received via mailing list)
On Sat, May 02, 2009 at 11:53:18AM -0500, Resicow wrote:

> files just stuck on the disk forever, or do I need to ensure the cache
> is empty if nginx needs to be restarted by manually deleting the objects?

While starting up workers look up disk cache on demand and update keys
zones in shared memory. Also the cache manager process runs in
background,
reads step by step a whole disk cache, and updates the keys zones, too.
After cache manager has read (it may take a long time for 50G) a whole
disk cache, workers use only keys zones to look up existence of
responses.
Upon that the cache manager now delete inactive responses and looks
after
disk cache size.

> Also on binary upgrades, will the internal proxy cache table survive?

Since keys zones are not shared between old and new processes, the new
workers and cache manager does the same as on start up.
Resicow (Guest)
on 2009-05-03 00:20
(Received via mailing list)
Sounds very intelligent, and good to know the cache won't need to be
deleted.

We are using this to cache small images, and we plan on pushing this to
multi-millions of individual files, and about a TB of storage, so I'll
let you know what type of performance we see under those conditions at
startup time.

Thanks,

John
Michał Jaszczyk (Guest)
on 2009-05-13 18:36
(Received via mailing list)
> We are using this to cache small images, and we plan on pushing this to
> multi-millions of individual files, and about a TB of storage, so I'll let
> you know what type of performance we see under those conditions at startup
> time.

Hey,

I'm planning to use Nginx in a similar environment, so your experience
would be very valuable to me. Could you tell me when will you perform
any experiments?

Best wishes,

Mike
This topic is locked and can not be replied to.