[WebSocket] error (disconnected by server): CloseEvent {reason: "", code: 1005, wasClean: true, path: NodeList[0], cancelBubble: false…}

556 views
Skip to first unread message

Kevin Welsh

unread,
Apr 7, 2015, 5:28:21 PM4/7/15
to nginxpu...@googlegroups.com
Hi,

I'm running an NGINX site with Pushstream on an embedded device. I post data to a channel with curl. All works as expected when the data being posted is relatively small.

On larger data sizes (1.5 MB), I get this error:

[WebSocket] error (disconnected by server): CloseEvent {reason: "", code: 1005, wasClean: true, path: NodeList[0], cancelBubble: false…}


Is there a configuration setting in nginx.conf, or in the Pushstream JavaScript setup, that I need to change?

I have already tried:
    push_stream_shared_memory_size 50M;
    client_max_body_size 50M;



Kevin

Wandenberg Peixoto

unread,
Apr 7, 2015, 5:48:37 PM4/7/15
to nginxpu...@googlegroups.com
Which module version are you using?

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

Kevin Welsh

unread,
Apr 7, 2015, 6:43:29 PM4/7/15
to nginxpu...@googlegroups.com
I think an upgrade to 0.4.1 may have just solved the issue. I'll keep an eye on it.

Kevin Welsh

unread,
Apr 7, 2015, 7:04:48 PM4/7/15
to nginxpu...@googlegroups.com
New error:

[WebSocket] error (disconnected by server): [object Event]

   "[WebSocket] error (disconnected by server):"
   {
      [functions]: ,
      __proto__: { },
      AT_TARGET: 2,
      bubbles: false,
      BUBBLING_PHASE: 3,
      cancelable: false,
      cancelBubble: false,
      CAPTURING_PHASE: 1,
      constructor: { },
      currentTarget: { },
      defaultPrevented: false,
      eventPhase: 2,
      isTrusted: true,
      srcElement: { },
      target: { },
      timeStamp: 1428447741819,
      type: "error"
   }

Have tried setting:
 push_stream_max_messages_stored_per_channel 2;
 push_stream_message_ttl 20;

but still having issues when the DATA being sent is about 1.5 MB



Kevin

Kevin Welsh

unread,
Apr 7, 2015, 7:05:39 PM4/7/15
to nginxpu...@googlegroups.com
[WebSocket] error (disconnected by server): [object CloseEvent]

   "[WebSocket] error (disconnected by server):"
   {
      [functions]: ,
      __proto__: { },
      AT_TARGET: 2,
      bubbles: false,
      BUBBLING_PHASE: 3,
      cancelable: false,
      cancelBubble: false,
      CAPTURING_PHASE: 1,
      code: 1006,

      constructor: { },
      currentTarget: { },
      defaultPrevented: false,
      eventPhase: 2,
      isTrusted: true,
      reason: "",
      srcElement: { },
      target: { },
      timeStamp: 1428447741826,
      type: "close",
      wasClean: false
   }

Wandenberg Peixoto

unread,
Apr 7, 2015, 9:05:57 PM4/7/15
to nginxpu...@googlegroups.com

Please, try with the master version.
This issue should be solved on the commit about the NGX_AGAIN error.

--

Kevin Welsh

unread,
Apr 8, 2015, 6:51:56 AM4/8/15
to nginxpu...@googlegroups.com
We are using the code from the current Master branch when we get this error.

Wandenberg Peixoto

unread,
Apr 8, 2015, 3:10:22 PM4/8/15
to nginxpu...@googlegroups.com
Hi Kevin,

are you sure that you were using the master code before?
Does not make sense you have said that "upgrade to 0.4.1" if you were at master.

By the way, what do you mean by "embedded device"?
How much memory this device has?
What is its OS?

Could you tell more about your environment and how are you getting this error?

Kevin Welsh

unread,
Apr 8, 2015, 3:18:56 PM4/8/15
to nginxpu...@googlegroups.com
We were on an older version when we had the initial error. Then we compiled the current master.

Running Arch Linux ARM. 1GB RAM.

We publish messages from the device, using curl to POST from PHP. Remote web browsers are the clients, and they are subscribing using pushstream.js. The error happens with just one subscriber.

The error happens when we send larger amounts of data to the channel. 1.5MB is enough to create this error.


I'm glad to tell you more... let me know what else you might need.



Kevin

Wandenberg Peixoto

unread,
Apr 10, 2015, 1:19:02 AM4/10/15
to nginxpu...@googlegroups.com
Hi Kevin,

I never used the Arch Linux, especially in a small device.
We can work together to figure out what is happening.

The module has some tests sending large messages with 4MB.
So the problem shouldn't be the module.

I'm guessing that you will have to change some OS configurations like the socket buffers size.
Since the Arch Linux is designed to be "a lightweight and flexible Linux® distribution that tries to Keep It Simple" 
probably it is using some configurations to not let the OS eat too much memory.

Have you tried to use another distro on a pc just to be sure that the setup (nginx + module + client code) works fine?
Can you help me to install the Arch on a VM to run some tests here?
If possible, also send me your nginx configuration, and any other information that might help.

Regards,
Wandenberg
Reply all
Reply to author
Forward
0 new messages