Nginx 1.7 and "push_stream_shared_memory_size"

1,264 views
Skip to first unread message

Jury Gerasimov

unread,
May 3, 2014, 5:21:55 AM5/3/14
to nginxpu...@googlegroups.com
Hi all,

is it nginx 1.7 compatible? Just installed the latest module and nginx, and got this error -

nginx: [error] push stream module: push_stream_shared_memory_size must be set. in /opt/nginx/conf/nginx.conf:290

OK I set it to 32M and got this -

nginx: [emerg] "push_stream_shared_memory_size" directive is not allowed here in /opt/nginx/conf/common.conf:207

What should I do with "push_stream_shared_memory_size" ? It worked fine without this directive on another nginx installation.

Wandenberg Peixoto

unread,
May 3, 2014, 8:33:48 AM5/3/14
to nginxpu...@googlegroups.com

You probably set the directive inside a location. It should be set at http or server level.

If not work share your configuration to be possible check what is happening.

Regards

--
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.

Jury Gerasimov

unread,
May 3, 2014, 9:23:35 AM5/3/14
to nginxpu...@googlegroups.com


On Saturday, May 3, 2014 9:33:48 PM UTC+9, Wanden wrote:

You probably set the directive inside a location. It should be set at http or server level.



You're right Wanden! I've moved it to http level and the message disappeared. Or actually changed to another error -

nginx: [error] push stream module: push_stream_channels_path must be set. in /opt/nginx/conf/nginx.conf:246

With this I'm just lost because this directive is set in my conf -

    location /tickets/api/pub {
            push_stream_publisher admin;
            set $push_stream_channel_id             $arg_id;
            allow  127.0.0.1;
        }
                                           
        location ~ /tickets/api/updates/(.*) {
            push_stream_subscriber                  long-polling;
            set $push_stream_channels_path          $1;
            push_stream_last_received_message_tag   $arg_tag;
            push_stream_last_received_message_time  $arg_time;
            push_stream_longpolling_connection_ttl  25s;
        }


Wandenberg Peixoto

unread,
May 3, 2014, 12:51:18 PM5/3/14
to nginxpu...@googlegroups.com

You missed to set the directive on publisher location.

Jury Gerasimov

unread,
May 3, 2014, 10:01:54 PM5/3/14
to nginxpu...@googlegroups.com


On Sunday, May 4, 2014 1:51:18 AM UTC+9, Wanden wrote:

You missed to set the directive on publisher location.


I've tried to set it there -


    location /tickets/api/pub {
            push_stream_publisher admin;
            set $push_stream_channel_id  $arg_id;
            set $push_stream_channels_path      $1;
            allow  127.0.0.1;
        }
 
OR


    location /tickets/api/pub {
            push_stream_publisher admin;
            set $push_stream_channel_id  $arg_id;
            push_stream_channels_path      $1;
            allow  127.0.0.1;
        }

- both variants show the same error.

What I don't understand is that this setup was copied from a working nginx server.

Wandenberg Peixoto

unread,
May 3, 2014, 10:25:07 PM5/3/14
to nginxpu...@googlegroups.com
You probably copied from an old version of push stream module.

Try this

        location /tickets/api/pub {
            push_stream_publisher admin;
            push_stream_channels_path      $arg_id;
            allow  127.0.0.1;
        }

push_stream_channels_path is not a variable on the lastest version like you used on first block, now it is a directive.
on the second block you set the value to $1 which is not defined on this location.



--

Jury Gerasimov

unread,
May 3, 2014, 11:09:00 PM5/3/14
to nginxpu...@googlegroups.com


On Sunday, May 4, 2014 11:25:07 AM UTC+9, Wanden wrote:
push_stream_channels_path is not a variable on the lastest version like you used on first block, now it is a directive.
on the second block you set the value to $1 which is not defined on this location.


That fixed the error, thank you Wanden!
Reply all
Reply to author
Forward
0 new messages