Comments (13)
@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.
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.
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.
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.
@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.
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.
/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.
@kapouer do the sockets stay open in this case too?
from engine.io.
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.
Just restart engine.io every 10 connections (reference) (just kidding)
from engine.io.
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.
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.
Thanks. Closing this for the time being.
from engine.io.
Related Issues (20)
- TypeError: Cannot destructure property 'Server' of '_engineIo.default' HOT 5
- Customize response headers with Express middleware HOT 6
- Possible error in websocket code HOT 2
- clientsCount property of server... why need to keep this private, HOT 1
- In package.json, move @types/* from dependencies to devDependencies HOT 9
- Log with pino-http middleware raises TypeError: res.on is not a function HOT 1
- Latest uWs not working HOT 5
- ReferenceError: TextDecoder is not defined HOT 5
- Getting unexpected messages from some clients HOT 2
- Node.js versions below 10.2 are not compatible with the latest version 6.5.1. HOT 1
- WebTransport If the length of the data block exceeds maxDatagramSize, the server will be unable to receive the complete message (the client will not send the complete message). HOT 2
- Upgrading from polling to webtransport will report engine invalid WebTransport handshake. HOT 8
- The cache busting t query parameter does not work if multiple connections to the server are made HOT 3
- Add support for Node.js built-in WebSocket? HOT 7
- Upgrade 6.5.2 but the error of uWebsocket aborted write failed still appear HOT 1
- Add new transport: gRPC-Web HOT 2
- HTTP/2 Web Socket in Chrome not working HOT 2
- Send callback may not be called if message is sent during upgrade window HOT 1
- Cannot set `socket.request` to `null` because the property is read-only
- `websocket`: `send` callbacks are not all called if multiple messages are sent rapidly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.io.