nginx push streams hangs with nginx 1.9.5

166 views
Skip to first unread message

maedama

unread,
Dec 23, 2015, 6:34:25 AM12/23/15
to nginxpushstream
Hi there,

Thanks for providing a wonderful module.

Let me ask a quick question regarding this module.
Is there known issue that make nginx hangs with using nginx-push-streams?

Currently I have no way to reproduce the problem but, sometimes nginx hangs when used together with nginx-push-streams.

When it hangs, nginx will not respond to any of the endpoint including endpoint that is not using nginx-push-stream features.


My nginx is running on amazon linux with following options

```
sudo nginx -V
built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
built with OpenSSL 1.0.1k-fips 8 Jan 2015
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g' --add-module=/home/ec2-user/ngx_mruby --add-module=/home/ec2-user/ngx_mruby/dependence/ngx_devel_kit --add-module=/home/ec2-user/nginx-push-stream-module
```

I have attached how configuration looks like

For now I can not find a way to reproduce this  problem.I will work on it, but if there is a known issue, or if you see immediately a problem in my current settings please let me know.

Thanks for your help


maedama

stream.conf

Wandenberg Peixoto

unread,
Dec 23, 2015, 9:00:25 AM12/23/15
to nginxpu...@googlegroups.com
Hi,

there isn't any known issue, but I have a question about your configuration.

Which kind of client you are expecting to connect on "/poll/" location?

The default behavior is to use chunked encoding responses on locations with "push_stream_subscriber" derective without any argument.
If you are planning to use only polling or long polling clients on these location set the proper configuration.

What I mean is, if you connect on this location the default behavior is create a stream to send messages that "never" closes. 
If you end the connection on client side, after receive a message as example, it will remain open on server side, until the server detects that the client has gone.
While using https this detection take a longer time to happens and you may have a problem of reaching the number of configured connections on each worker. Resulting on the problem of nginx does not accept any new connection.

Check the nginx error log to see if there is any problem.

Regards,
Wandenberg


--
You received this message because you are subscribed to the Google Groups "nginxpushstream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginxpushstre...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

maedama

unread,
Dec 24, 2015, 9:57:46 AM12/24/15
to nginxpushstream
Hi,

thanks for your response.

Poll location is used only by admin, so I believe it should not be a route cause.

>What I mean is, if you connect on this location the default behavior is create a stream to send messages that "never" closes. 
>If you end the connection on client side, after receive a message as example, it will remain open on server side, until the server detects that the client has gone.
>While using https this detection take a longer time to happens and you may have a problem of reaching the number of configured connections on each worker. Resulting on the problem of >nginx does not accept any new connection.

This is a good information, I didn't know about it.

I will look into this problem myself and reply to this message when that finishes.

Thanks for your support!


2015年12月23日水曜日 23時00分25秒 UTC+9 Wanden:
Reply all
Reply to author
Forward
0 new messages