changeset 2694:49a1382b249b

set cache manager maximum sleep time to 10s
author Igor Sysoev <igor@sysoev.ru>
date Fri, 10 Apr 2009 17:46:25 +0000
parents 197cda0e767e
children aa95c69c3068
files src/http/ngx_http_file_cache.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c	Fri Apr 10 17:45:07 2009 +0000
+++ b/src/http/ngx_http_file_cache.c	Fri Apr 10 17:46:25 2009 +0000
@@ -818,12 +818,12 @@
 
     name = ngx_alloc(len + 1, ngx_cycle->log);
     if (name == NULL) {
-        return 60;
+        return 10;
     }
 
     ngx_memcpy(name, path->name.data, path->name.len);
 
-    wait = 60;
+    wait = 10;
     tries = 0;
 
     ngx_shmtx_lock(&cache->shpool->mutex);
@@ -891,7 +891,7 @@
 
     name = ngx_alloc(len + 1, ngx_cycle->log);
     if (name == NULL) {
-        return 60;
+        return 10;
     }
 
     ngx_memcpy(name, path->name.data, path->name.len);
@@ -903,7 +903,7 @@
     for ( ;; ) {
 
         if (ngx_queue_empty(cache->queue)) {
-            wait = 60;
+            wait = 10;
             break;
         }
 
@@ -914,7 +914,7 @@
         wait = fcn->expire - now;
 
         if (wait > 0) {
-            wait = wait > 60 ? 60 : wait;
+            wait = wait > 10 ? 10 : wait;
             break;
         }
 
@@ -1042,7 +1042,7 @@
         cache->files = 0;
 
         if (ngx_walk_tree(&tree, &cache->path->name) == NGX_ABORT) {
-            return 60;
+            return 10;
         }
 
         *cache->cold = 0;