<html><body bgcolor="#FFFFFF"><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; ">nginx_http_push_module exists some bugs now.</span></div>
<div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; "><br>
</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; ">The author uses a global pool to allocate small memory, while free it when use up. As we known,Nginx won&#39;t free small memory until we destory it. So it leads to memory leaks.</span></div>
<div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; "><br>
</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; ">see:<a href="http://blog.lifeibo.com">http://blog.lifeibo.com</a> for more informations.</span></div>
<div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); font-size: 16px; font-weight: bold; line-height: 18px; "><br>
</span></div><div>lizi</div><div><br>at 2011-2-25,14:09,&quot;zeeshan.m.malik&quot; &lt;<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>&gt; :<br><br></div><div></div><blockquote type="cite"><div><span>Hi,</span><br>
<span>I am using nginx_http_push_module for  a web service which provides real</span><br><span>time visitors stats for websites using our service. The service works</span><br><span>fine for couple of days but after that it stops responding and leaves</span><br>
<span>errors like following in error.log for each subscriber or publisher</span><br><span>request.</span><br><span></span><br><span>     2011/02/21 04:00:55 [crit] 18800#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br>
<span>     2011/02/21 04:00:55 [crit] 18800#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:55 [error] 18800#0: *2812675 push module: unable</span><br><span>to allocate message in shared memory, client: 127.0.0.1, server:</span><br>
<span><a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>, request: &quot;POST</span><br><span>/publish?id=a837a96c06a029d36c1503d9c450c79a HTTP/1.1&quot;, host:</span><br><span>&quot;<a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>&quot;</span><br>
<span>     2011/02/21 04:00:58 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:58 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:58 [error] 18798#0: *2812340 push module: unable</span><br>
<span>to allocate worker subscriber queue marker in shared memory, client:</span><br><span>213.58.208.210, server: <a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>, request: &quot;GET</span><br><span>/activity?id=870897807857a92dcdfdadf3721aba71&amp;_1298288754326= HTTP/1.1&quot;,</span><br>
<span>host: &quot;<a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>&quot;, referrer:</span><br><span>&quot;<a href="http://www.keepersofmetal.net/search/label/Visions%20of%20Atlantis">http://www.keepersofmetal.net/search/label/Visions%20of%20Atlantis</a>&quot;</span><br>
<span>     2011/02/21 04:00:59 [crit] 18799#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:59 [crit] 18799#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:59 [error] 18799#0: *2812817 push module: unable</span><br>
<span>to allocate message in shared memory, client: 127.0.0.1, server:</span><br><span><a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>, request: &quot;POST</span><br><span>/publish?id=d1637e1f2fedb569c1350a6ccd6d79e2 HTTP/1.1&quot;, host:</span><br>
<span>&quot;<a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>&quot;</span><br><span>     2011/02/21 04:00:59 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span>     2011/02/21 04:00:59 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br>
<span>memory</span><br><span>     2011/02/21 04:00:59 [error] 18798#0: *2812828 push module: unable</span><br><span>to allocate message in shared memory, client: 127.0.0.1, server:</span><br><span><a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>, request: &quot;POST</span><br>
<span>/publish?id=f6d0850613e92edeacf3b7596aa304b3 HTTP/1.1&quot;, host:</span><br><span>&quot;<a href="http://async-presence.bumpin.com">async-presence.bumpin.com</a>&quot;</span><br><span>     2011/02/21 04:01:00 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br>
<span>memory</span><br><span>     2011/02/21 04:01:00 [crit] 18798#0: ngx_slab_alloc() failed: no</span><br><span>memory</span><br><span></span><br><span></span><br><span>And even when it is working it generates lots of errors</span><br>
<span>     2011/02/22 03:42:58 [alert] 4665#0: ngx_slab_free(): chunk is</span><br><span>already free </span><br><span></span><br><span>Following are my push configurations:</span><br><span></span><br><span></span><br><span>        location /publish {</span><br>
<span>          set $push_channel_id $arg_id; #/?id=239aff3 or somesuch</span><br><span>          push_publisher;</span><br><span></span><br><span>          push_store_messages off; # enable message queueing</span><br><span>        }</span><br>
<span></span><br><span>        # public long-polling endpoint</span><br><span>        location /activity {</span><br><span>          push_subscriber;</span><br><span></span><br><span>          push_subscriber_concurrency broadcast;</span><br>
<span>          set $push_channel_id $arg_id;</span><br><span>          default_type text/plain;</span><br><span>          send_timeout 3600;</span><br><span>        }</span><br><span></span><br><span></span><br><span>And here is the output of command nginx -V</span><br>
<span>     nginx version: nginx/0.8.54</span><br><span>     built by gcc 4.3.3 (Ubuntu 4.3.3-5ubuntu4) </span><br><span>     TLS SNI support enabled</span><br><span>     configure arguments: --conf-path=/etc/nginx/nginx.conf</span><br>
<span>--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid</span><br><span>--lock-path=/var/lock/nginx.lock</span><br><span>--http-log-path=/var/log/nginx/access.log --with-http_dav_module</span><br><span>--http-client-body-temp-path=/var/lib/nginx/body --with-http_ssl_module</span><br>
<span>--http-proxy-temp-path=/var/lib/nginx/proxy</span><br><span>--with-http_stub_status_module</span><br><span>--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug</span><br><span>--with-http_flv_module --add-module=/opt/nginx_http_push_module-0.692</span><br>
<span></span><br><span>Is this behavior due to some bug in the push module or is there</span><br><span>something wrong with my server configurations.</span><br><span></span><br><span>Thanks,</span><br><span>Zeeshan</span><br>
<span></span><br><span>Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,178290,178290#msg-178290"><a href="http://forum.nginx.org/read.php?2,178290,178290#msg-178290">http://forum.nginx.org/read.php?2,178290,178290#msg-178290</a></a></span><br>
<span></span><br><span></span><br><span>_______________________________________________</span><br><span>nginx mailing list</span><br><span><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></span><br><span><a href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a></span><br>
</div></blockquote></body></html>