changeset 5635:c348dea081fb

Core: hash now ignores bucket_size if it hits max_size limit.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 31 Mar 2014 21:40:31 +0400
parents 5024d29354f1
children 54f847c88cf7
files src/core/ngx_hash.c
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -312,15 +312,12 @@ ngx_hash_init(ngx_hash_init_t *hinit, ng
         continue;
     }
 
-    ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0,
-                  "could not build the %s, you should increase "
-                  "either %s_max_size: %i or %s_bucket_size: %i",
+    ngx_log_error(NGX_LOG_WARN, hinit->pool->log, 0,
+                  "could not build optimal %s, you should increase "
+                  "either %s_max_size: %i or %s_bucket_size: %i; "
+                  "ignoring %s_bucket_size",
                   hinit->name, hinit->name, hinit->max_size,
-                  hinit->name, hinit->bucket_size);
-
-    ngx_free(test);
-
-    return NGX_ERROR;
+                  hinit->name, hinit->bucket_size, hinit->name);
 
 found: