{"channel": "RNuCFWJh1a", "published_messages": "1", "stored_messages": "1", "subscribers": "0"},
{"channel": "q4jNxLs3KM", "published_messages": "0", "stored_messages": "0", "subscribers": "0"},
{"channel": "LRxt4D8vOo", "published_messages": "0", "stored_messages": "0", "subscribers": "0"}
pid logs/nginx.pid;
error_log logs/nginx-main_error.log debug;
worker_processes 2;
events {
worker_connections 1024;
use epoll;
}
http {
postpone_output 1; # only postpone a single byte, default 1460 bytes
access_log logs/nginx-http_access.log;
push_stream_shared_memory_size 512m;
push_stream_max_channel_id_length 200;
# max messages to store in memory
push_stream_max_messages_stored_per_channel 50;
# message ttl
push_stream_message_ttl 1440m;
# ping frequency
push_stream_ping_message_interval 30s;
# connection ttl to enable recycle
push_stream_subscriber_connection_ttl 45m;
# connection ttl for long polling
push_stream_longpolling_connection_ttl 30s;
push_stream_timeout_with_body off;
# wildcard
push_stream_wildcard_channel_prefix "broad_";
push_stream_wildcard_channel_max_qtd 3;
#push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\", \"tag\":\"~tag~\", \"time\":\"~time~\", #\"eventid\":\"~event-id~\"}";
# subscriber may create channels on demand or only authorized (publisher) may do it?
push_stream_authorized_channels_only off;
push_stream_allowed_origins "*";
server {
listen 80 default_server;
server_name localhost ;
location /pub {
# activate publisher (admin) mode for this location
push_stream_publisher admin;
# query string based channel id
push_stream_channels_path $arg_id;
# store messages in memory
push_stream_store_messages on;
}
location /channels-stats {
# activate channels statistics mode for this location
push_stream_channels_statistics;
# query string based channel id
push_stream_channels_path $arg_id;
}
location /sub/(.*) {
# content-type
default_type "application/json; charset=utf-8";
push_stream_subscriber;
# positional channel path
push_stream_channels_path $1;
}
location ~ /ws/(.*) {
# activate websocket mode for this location
push_stream_subscriber websocket;
# positional channel path
push_stream_channels_path $1;
push_stream_last_received_message_time "$arg_time";
push_stream_last_received_message_tag "$arg_tag";
# message template
push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":~text~,\"tag\":\"~tag~\",\"time\":\"~time~\"}";
# ping frequency
push_stream_ping_message_interval 10s;
push_stream_websocket_allow_publish on;
}
location /static/ {
alias /home/ubuntu/static/;
include /usr/local/nginx/conf/mime.types;
}
location / {
#include proxy_params;
proxy_pass http://unix:/home/ubuntu/project/my_site/my_site.sock;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
}
--
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.
Hi Krishnaxv,any specific reason to be using postpone_output as 1 ?
This will make connections very very slow, what can make your client disconnect before receive aey Wandenll bytes.
2016/01/19 14:31:44 [info] 4057#0: *19893 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453213940773&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A50%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:32:26 [info] 4057#0: *19895 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/LRxt4D8vOo?_=1453213983715&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A48%20GMT&eventid= HTTP/1.1", host: "www.my-site.com"
2016/01/19 14:32:36 [info] 4057#0: *19896 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453213993296&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A02%3A46%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:32:44 [info] 4057#0: *19897 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453214001774&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A50%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:33:26 [info] 4057#0: *19898 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/LRxt4D8vOo?_=1453214043966&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A48%20GMT&eventid= HTTP/1.1", host: "www.my-site.com"
2016/01/19 14:33:36 [info] 4057#0: *19899 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453214053570&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A02%3A46%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:33:45 [info] 4057#0: *19900 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453214062773&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A50%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:34:27 [info] 4057#0: *19901 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/LRxt4D8vOo?_=1453214104226&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A48%20GMT&eventid= HTTP/1.1", host: "www.my-site.com"
2016/01/19 14:34:37 [info] 4057#0: *19902 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453214113853&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A02%3A46%20GMT&eventid= HTTP/1.1", host: "my-site.com"
2016/01/19 14:34:47 [info] 4057#0: *19903 push stream module: client closed prematurely connection (11: Resource temporarily unavailable), client: 111.93.185.242, server: localhost, request: "GET /ws/RNuCFWJh1a/q4jNxLs3KM?_=1453214123773&tag=0&time=Tue%2C%2019%20Jan%202016%2014%3A05%3A50%20GMT&eventid= HTTP/1.1", host: "my-site.com"