slact / nchan

Fast, horizontally scalable, multiprocess pub/sub queuing server and proxy for HTTP, long-polling, Websockets and EventSource (SSE), powered by Nginx.
https://nchan.io/
Other
3.01k stars 292 forks source link

"subrequests cycle" error after 200 websocket publish requests with nchan_publisher_upstream_request #152

Closed valydvweb closed 8 years ago

valydvweb commented 8 years ago

Hello Leo,

First time ... congratulations for this project !

I encountered the following problem, starting from the nginx configuration file,

  location /test {
       nchan_pubsub websocket;
       nchan_channel_id "test";
       nchan_store_messages off;
       nchan_message_timeout 60s;
       nchan_channel_group test;
       nchan_publisher_upstream_request "/pub";
   }

   location /pub {
        proxy_pass "http://www.mydomain.com/test.php";
    }

At over 200 requests - error occurs:

2016/04/15 02:15:52 [error] 1208#0: *5 subrequests cycle while processing "/pub" while sending to client, client: [my-ip], server: [my-host], request: "GET /test HTTP/1.1", host: "[my-host]" 2016/04/15 02:15:52 [alert] 1206#0: worker process 1208 exited on signal 11

Thank you so much, Valy

slact commented 8 years ago

Hey, thanks for using Nchan. Can you tell me what response the script at http://www.mydomain.com/test.php produces? Please include the status code and the headers.

Also, can you tell me what nchan version you are using, as well as the output of nginx -V.

valydvweb commented 8 years ago

test.php is a simple echo script <?php echo 'Done'; ?>

Can be accessed at: http://dvweb.ro/test.php

nchan-0.99.12 nginx version: nginx/1.8.1

For testing i use html5 websocket

slact commented 8 years ago

Alright, I've been able to reproduce this and I'll let you know when it's fixed.

slact commented 8 years ago

Fixed in 371f1ac62a, and with just 1 line of code.

valydvweb commented 8 years ago

Now works fine. Thank's

slact commented 8 years ago

Great! Thanks for your bug report.