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
Leaks? #55
Comments
The problem appears to be that the watcher greenlet never exits. Adding a 'break' on L396 of virtsocket.py stops the leaks, in my testing at least. |
After this patch i started to get this error on each request: Traceback (most recent call last): |
I didn't see that here, though I only tested with the example simple chat server and my app (https://github.com/leapfrogdevelopment/womack), which is also pretty simple. I'm also using a more recent gevent, if that makes a difference. |
i'm trying to implement chat with 9-12к load. And i can say that it realy leaking, for now i'm testing it with different configurations. Above error i'm getting from rime to time, but after your patch i starting to get it after each request. |
I'm not sure why allowing the watcher greenlet for a disconnected request to exit would cause any issues for future requests. environ['socketio'] is set by the SocketIOHandler, which should be handling every request before the app code that runs socketio_manage gets a chance to do anything. I don't understand that at all, unless somehow the browser side is doing something crazy, or you're passing non-socketio urls to socketio_manage and it was seeming to work before somehow because of the old greenlets hanging around. |
I have a similar problem when trying the simple_pyramid_chat example with gevent-socketio==0.3.5-rc2.
|
The README for simple_pyramid_chat says that it should be started by running In any case, when I run the app with |
You're right, sorry for the noise. |
It looks to me from running the simple chat example (and other applications) under Dozer (https://bitbucket.org/bbangert/dozer) that gevent-socketio is leaking a socketio.virtsocket.Socket and geventwebsocket.websocket.WebSocketHybi on every disconnect (along with a host of related/connected gevent/greenlet things).
The problem, as best as I can see, is that although kill() runs when the socket disconnects, the socket itself is never actually disposed of. From looking at the dozer output it seems like the problem may be that the environ dict is never deleted, so references remain to the websocket and socketio objects. I don't know if that's right (or even reasonable), or what to do to fix it.
The text was updated successfully, but these errors were encountered: