GithubHelp home page GithubHelp logo

Comments (13)

rauchg avatar rauchg commented on July 1, 2024

@kapouer good find. It seems to me that some sockets are throwing instead of emitting error events, therefore never getting properly shut down.

What do you think about this assessment @einaros ?

from engine.io.

einaros avatar einaros commented on July 1, 2024

In the last version of ws, much has been done to take care of this. I suspect that the websocket handlers in websocket.io, which are not part of the parsers imported from ws, could need similar measures.

Ideally, as much as possible of what websocket.io is doing should be left to ws, so that fixes can land in one place rather than several :)

On 8. juli 2012, at 23:07, Guillermo [email protected] wrote:

@kapouer good find. It seems to me that some sockets are throwing instead of emitting error events, therefore never getting properly shut down.

What do you think about this assessment @einaros ?


Reply to this email directly or view it on GitHub:
#33 (comment)

from engine.io.

rauchg avatar rauchg commented on July 1, 2024

Sure but it's ws:

at WebSocket.send (/xxx/node_modules/engine.io/node_modules/websocket.io/node_modules/ws/lib/WebSocket.js:175:16)

from engine.io.

einaros avatar einaros commented on July 1, 2024

I'm not entirely up to speed on how websocket.io's hybi.js uses ws. Which version of ws is running here? As I said, much has been done in the last release. If an earlier one is in use, then I am not surprised. If it is the latest version, I will have to look into how the library is being used, and see how exactly this can occur.

@nicokaiser, have you seen any improvements with regards to lingering sockets using barebones ws lately?

from engine.io.

nicokaiser avatar nicokaiser commented on July 1, 2024

@einaros Currently it looks quite good, no crashes and only moderate growth in memory consumption (apart from Node not releasing unused memory). But, I set custom "error" and "timeout" handlers to the socket before handing them to ws.handleUpgrade. The wsio.Socket does the same, so there should be no difference.

from engine.io.

kapouer avatar kapouer commented on July 1, 2024

Since engine.io 0.1.2 it seems the errors i'm seeing have changed :

Error: reserved fields must be empty
at WebSocket.onError (/home/test/node_modules/engine.io/lib/transport.js:77:13)
at WebSocket.emit (events.js:70:17)
at Receiver.onerror (/home/test/node_modules/engine.io/node_modules/ws/lib/WebSocket.js:542:10)
at Receiver.error (/home/test/node_modules/engine.io/node_modules/ws/lib/Receiver.js:301:8)
at Receiver.processPacket (/home/test/node_modules/engine.io/node_modules/ws/lib/Receiver.js:187:10)
at Receiver.add (/home/test/node_modules/engine.io/node_modules/ws/lib/Receiver.js:93:24)
at Socket.firstHandler (/home/test/node_modules/engine.io/node_modules/ws/lib/WebSocket.js:500:22)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:367:14)

Note that the client is still 0.1.0 so kill me if that's the reason.

from engine.io.

rauchg avatar rauchg commented on July 1, 2024

/me kills him

On 0.1.2 we upgraded the ws transport. @einaros do you have any guesses what could be causing this?

from engine.io.

rauchg avatar rauchg commented on July 1, 2024

@kapouer do the sockets stay open in this case too?

from engine.io.

kapouer avatar kapouer commented on July 1, 2024

it's hard to mesure so i'm not sure, but i'm almost sure there are much less sockets left open. The ratio i mesure has been staying low for days.

from engine.io.

rauchg avatar rauchg commented on July 1, 2024

Just restart engine.io every 10 connections (reference) (just kidding)

from engine.io.

nicokaiser avatar nicokaiser commented on July 1, 2024

I'm also getting these errors with plain ws, but I thought this was because of broken clients or proxies.

In my case, the first WebSocket packet they sent was the header again, yet I was not able to reproduce this...

Am 04.08.2012 um 17:25 schrieb Guillermo Rauch [email protected]:

/me kills him

On 0.1.2 we upgraded the ws transport. @einaros do you have any guesses what could be causing this?


Reply to this email directly or view it on GitHub:
#33 (comment)

from engine.io.

einaros avatar einaros commented on July 1, 2024

Interfering proxies or client issues may cause that. I'm pretty confident a
ws client setver combo without intermediates wouldn't cause that.
On Aug 4, 2012 5:53 PM, "Nico Kaiser" <
[email protected]>
wrote:

I'm also getting these errors with plain ws, but I thought this was
because of broken clients or proxies.

In my case, the first WebSocket packet they sent was the header again, yet
I was not able to reproduce this...

Am 04.08.2012 um 17:25 schrieb Guillermo Rauch [email protected]:

/me kills him

On 0.1.2 we upgraded the ws transport. @einaros do you have any guesses
what could be causing this?


Reply to this email directly or view it on GitHub:
#33 (comment)


Reply to this email directly or view it on GitHub:
#33 (comment)

from engine.io.

rauchg avatar rauchg commented on July 1, 2024

Thanks. Closing this for the time being.

from engine.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.