-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught "zlib binding closed" errors #628
Comments
Same Error here.
Server restarts about 1-2 times daily. 100 - 200 users online |
Hi! It seems to be caused by the use of var PerMessageDeflate = require('./lib/PerMessageDeflate');
var extension = new PerMessageDeflate();
extension.accept([{}]);
extension.compress(new Buffer([1, 2, 3]), true, function(err, compressed) {
console.log('compress %s', err);
// compress Error: zlib binding closed
});
extension.cleanup(); The listener is removed there https://github.com/websockets/ws/blob/master/lib/PerMessageDeflate.js#L304, but there should not be any call to |
Hi! @DanReyLop @Niceman35 would you be able to test whether this PR #632 does actually fix the issue? |
I have a (potentially) related problem, but in my case it's a lower-level assertion fail - see #633 |
@jancurn probably an older node version? Prior to this patch: nodejs/node-v0.x-archive#7775 |
@rauchg I don't think so: I ran a stress test once w/ compression that sent large amount of data back and forth on Node 5.x, and that same assertion fail (or maybe a different one, I can't quite remember) popped up every so often. |
@SEAPUNK the assertion that crashes the process or an uncaught exception? |
@rauchg The assertion that crashes the process. I'll do that test again to get the exact error, but not right now -- I'm investigating a different problem that for some reason is corrupting the data I'm trying to send over websockets. |
@darrachequesne Sorry, but I've tried to reproduce the error in the current 0.8.1 version (which should produce the error) and I couldn't. That's the thing about race conditions, impossible to reproduce reliably... I guess you will have to fix blindly in this PR :( Maybe @Niceman35 has more luck, if his server restarts 1-2 times a day because of this bug, having him run it with your patch for a few days can give us a more definite answer. |
@rauchg The server was running Node version v4.2.3 |
My servers started to crash because of the reported "Error: zlib binding closed" error every ~5 minutes (have thousands of active users) as soon as i updated ws module from version 0.7.0 to 0.8.1 (latest version on npm as of today 30/12/2015). If you are there already, please also fix related issue: (set error listener to catch error events BEFORE processing the first incoming user bytes) |
Please make pull request. |
I am seeing this problem with version 0.8.1. I have Apache running as a reverse websocket proxy. While people are connected through the proxy to a 'ws' socket I get this problem every single time I restart Apache.
EDIT: I feel stupid now. Just realised the latest version is 2.1.0. Anyway, this still stands with version 0.8.1. I will try upgrading to 2.1.0 soon. |
I'm setting up a simple WebSockets server, and this error (apparently randomly) happened:
It happened in a moment where the client was connecting and disconnecting continuously, so maybe it's caused by a race condition when the connection is closed abruptly. I wasn't able to reproduce it again. I had the PerMessageDeflate extension enabled (the WS server was configured as default).
It looks like it's the same issue as this: faye/permessage-deflate-node#1
Edit: I forgot, I'm using version 0.8.1 of ws.
The text was updated successfully, but these errors were encountered: