chenmin7249
nginx clear static file cache without restarting
June 13, 2012 08:10AM
i'm using nginx1.0.15 stable to serve static files, and with following
configurations:

sendfile on;
tcp_nopush on;
tcp_nodelay on;
open_file_cache max=1048000 inactive=604800s;
open_file_cache_min_uses 1;
open_file_cache_valid 3600s;

here is my problem, how can i clear the static file cache without
restarting nginx without 'killall -HUP nginx'?

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: nginx clear static file cache without restarting
June 13, 2012 12:40PM
Hello!

On Wed, Jun 13, 2012 at 02:04:56AM -0400, chenmin7249 wrote:

> i'm using nginx1.0.15 stable to serve static files, and with following
> configurations:
>
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> open_file_cache max=1048000 inactive=604800s;
> open_file_cache_min_uses 1;
> open_file_cache_valid 3600s;
>
> here is my problem, how can i clear the static file cache without
> restarting nginx without 'killall -HUP nginx'?

No, the only way to reset open file cache is to restart worker
processes. Sending SIGHUP to let nginx start new worker processes
and gracefully shutdown old ones is the easiest way to do this.

And just to make sure it's clear: restarting worker processes via
SIGHUP doesn't imply any downtime. All connections will be
accepted and all requests will be handled, no animals will be
harmed and so on.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login