Re: After reload, nginx's CPU usage jumped to 100 percent(backtrace provided)
Maxim Dounin
mdounin at mdounin.ru
Tue Jul 12 18:08:33 MSD 2011
Hello!
On Tue, Jul 12, 2011 at 09:31:07PM +0800, 杨镭 wrote:
> After reload, all the worker processes, including newly forked ones, goes
> straight to 100% CPU:
[...]
> Also, we took backtrace for cache manger process:
>
>
> Attaching to process 17306
> ngx_http_file_cache_expire (data=<value optimized out>) at
> src/http/ngx_http_file_cache.c:1096
> 1096 if (fcn->count == 0) {
> (gdb) bt
> #0 ngx_http_file_cache_expire (data=<value optimized out>) at
> src/http/ngx_http_file_cache.c:1096
Could you please show
p *fcn
?
I think I see the problem, but just to make sure.
If you are able to reproduce the problem please try the following
patch:
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -1099,7 +1099,8 @@ ngx_http_file_cache_expire(ngx_http_file
}
if (fcn->deleting) {
- continue;
+ wait = 1;
+ break;
}
p = ngx_hex_dump(key, (u_char *) &fcn->node.key,
Maxim Dounin
More information about the nginx
mailing list