2011年2月27日星期日

Re: Error in nginx_http_push_module: unable to allocate message, worker subscriber queue marker in shared memory

nginx_http_push_module exists some bugs now.

The author uses a global pool to allocate small memory, while free it when use up. As we known,Nginx won't free small memory until we destory it. So it leads to memory leaks.

see:http://blog.lifeibo.com for more informations.

lizi

at 2011-2-25,14:09,"zeeshan.m.malik" <nginx-forum@nginx.us> :

Hi,
I am using nginx_http_push_module for  a web service which provides real
time visitors stats for websites using our service. The service works
fine for couple of days but after that it stops responding and leaves
errors like following in error.log for each subscriber or publisher
request.

    2011/02/21 04:00:55 [crit] 18800#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:55 [crit] 18800#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:55 [error] 18800#0: *2812675 push module: unable
to allocate message in shared memory, client: 127.0.0.1, server:
async-presence.bumpin.com, request: "POST
/publish?id=a837a96c06a029d36c1503d9c450c79a HTTP/1.1", host:
"async-presence.bumpin.com"
    2011/02/21 04:00:58 [crit] 18798#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:58 [crit] 18798#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:58 [error] 18798#0: *2812340 push module: unable
to allocate worker subscriber queue marker in shared memory, client:
213.58.208.210, server: async-presence.bumpin.com, request: "GET
/activity?id=870897807857a92dcdfdadf3721aba71&_1298288754326= HTTP/1.1",
host: "async-presence.bumpin.com", referrer:
"http://www.keepersofmetal.net/search/label/Visions%20of%20Atlantis"
    2011/02/21 04:00:59 [crit] 18799#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:59 [crit] 18799#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:59 [error] 18799#0: *2812817 push module: unable
to allocate message in shared memory, client: 127.0.0.1, server:
async-presence.bumpin.com, request: "POST
/publish?id=d1637e1f2fedb569c1350a6ccd6d79e2 HTTP/1.1", host:
"async-presence.bumpin.com"
    2011/02/21 04:00:59 [crit] 18798#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:59 [crit] 18798#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:00:59 [error] 18798#0: *2812828 push module: unable
to allocate message in shared memory, client: 127.0.0.1, server:
async-presence.bumpin.com, request: "POST
/publish?id=f6d0850613e92edeacf3b7596aa304b3 HTTP/1.1", host:
"async-presence.bumpin.com"
    2011/02/21 04:01:00 [crit] 18798#0: ngx_slab_alloc() failed: no
memory
    2011/02/21 04:01:00 [crit] 18798#0: ngx_slab_alloc() failed: no
memory


And even when it is working it generates lots of errors
    2011/02/22 03:42:58 [alert] 4665#0: ngx_slab_free(): chunk is
already free

Following are my push configurations:


       location /publish {
         set $push_channel_id $arg_id; #/?id=239aff3 or somesuch
         push_publisher;

         push_store_messages off; # enable message queueing
       }

       # public long-polling endpoint
       location /activity {
         push_subscriber;

         push_subscriber_concurrency broadcast;
         set $push_channel_id $arg_id;
         default_type text/plain;
         send_timeout 3600;
       }


And here is the output of command nginx -V
    nginx version: nginx/0.8.54
    built by gcc 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
    TLS SNI support enabled
    configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log --with-http_dav_module
--http-client-body-temp-path=/var/lib/nginx/body --with-http_ssl_module
--http-proxy-temp-path=/var/lib/nginx/proxy
--with-http_stub_status_module
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug
--with-http_flv_module --add-module=/opt/nginx_http_push_module-0.692

Is this behavior due to some bug in the push module or is there
something wrong with my server configurations.

Thanks,
Zeeshan

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


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论