Blake
Blake

Reputation: 7547

Socket stops streaming after 3-5 minutes

I am using socket.io with web worker to stream images to the server side, the image is around 500k and I post one image per second to the web worker for streaming. The server side will count how many images it received. However, the system will stop streaming after 3-5 minutes. I used var socket = io.connect('http://localhost:3000',{reconnection: false,forceNew: true}); to force reconnect, but it still suffer from the same problem. I am using laptop as client and server. Any ideas why?

Upvotes: 1

Views: 508

Answers (1)

Zezura
Zezura

Reputation: 126

I'm a junior programmer, and maybe you already checked this.

  • is one of your connection points (server or client) crashing & or receive an exception.

  • do you release your images out of the memory, maybe your program is keeping your images into memory and does your program crash because it is out of memory or exceeds the max memory bound.

  • have your tried to lower the count of images your sending or tried to lower the interval or both.

  • did you try to change the size of your images, or tried to send just plain data.

  • also try to change the settings, and force different modes, such as action script or disable polling.

  • some other people have problems like you, check this: NodeJS socket IO stop emitting randomly?

also, does your program halt or goes to an Idle state (asking for both ends)?

also try to send debug info with the images, so you can see which image it stops and see how many images got sent over the connection.

try to debug as much as you can,

I hope this helps!

Upvotes: 1

Related Questions