Closed takano32 closed 8 years ago
The message above indicates that the bucket size of the hash table of the name of small_light_init_params
is not enough.
https://github.com/cubicdaiya/ngx_small_light/blob/master/src/ngx_http_small_light_module.c#L266
The bucket size of this hash table is assigned to ngx_cacheline_size
. The value of this variable is environment-dependent. Would you like to try the patch below?
diff --git a/src/ngx_http_small_light_module.c b/src/ngx_http_small_light_module.c
index 6c03fa1..b5b7809 100644
--- a/src/ngx_http_small_light_module.c
+++ b/src/ngx_http_small_light_module.c
@@ -263,7 +263,7 @@ static ngx_int_t ngx_http_small_light_header_filter(ngx_http_request_t *r)
hash_init.hash = &ctx->hash;
hash_init.key = ngx_hash_key_lc;
hash_init.max_size = 128;
- hash_init.bucket_size = ngx_cacheline_size;
+ hash_init.bucket_size = 128;
hash_init.name = "small_light_init_params";
hash_init.pool = ctx->params.keys.pool;
hash_init.temp_pool = NULL;
And tell me about your environment such as OS and CPU architecture (e.g. amd64, i386).
Thanks!
I'll try above fix. In advance, my Nginx machine environment is these.
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 6
model name : QEMU Virtual CPU version 2.0.0
stepping : 3
microcode : 0x1
cpu MHz : 3392.292
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good n
opl pni vmx cx16 x2apic popcnt hypervisor lahf_lm tpr_shadow vnmi flexpriority ept vpid
bugs :
bogomips : 6784.58
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 6
model name : QEMU Virtual CPU version 2.0.0
stepping : 3
microcode : 0x1
cpu MHz : 3392.292
cache size : 4096 KB
physical id : 1
siblings : 1
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good n
opl pni vmx cx16 x2apic popcnt hypervisor lahf_lm tpr_shadow vnmi flexpriority ept vpid
bugs :
bogomips : 6784.58
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
and uname -a
outputs Linux dev01 4.4.0-34-generic #53~14.04.1-Ubuntu SMP Wed Jul 27 16:56:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
.
Thank you. This patch well it works!
I got this message.
But these parameters are not able to set in nginx.conf. And
src/ngx_http_small_light_module.c
has these parameter.I can't understand this error message. What does this mean?