dhruvbird/node-xmpp-bosh — Issue #8: Huge memory leak when using node-xmpp-bosh extensively
Author: gooooer
Created: 2012-02-16 08:07:35+00:00
State: open

Hi.

I was using node-xmpp-bosh server with Strophe-1.0.2 library on client side. Generally it was working OK but there was one issue: after some time the connection to node-xmpp-bosh server is lost and client doesn't know about that. So messages didn't transfer to the target and client's contact became offline(from target's point of view) too.

I found the thread where similar problem was discussed and solved: http://groups.google.com/group/strophe/browse_thread/thread/411e17f93859d915 . I used this Strophe plugin https://github.com/zanchin/strophejs/blob/master/plugins/plugin.cm.js and eventually messages transferring became reliable. But this lead to another problem - server's PC goes out of memory after ~5 hours of work and the only way to fix this is restart bosh server.
I also noticed that after integrating that Strophe plugin the numbers at "X/Y active sessions" are growing faster. Typycally I have 10-12 active sessions (simultaneously connected clients) and Y number is growing very fast. E.g. like +10 used sessions per 5 minutes.
So it looks like aggressive connection manager plugin which I took from https://github.com/zanchin/strophejs/blob/master/plugins/plugin.cm.js is breaking node-xmpp-bosh server.

I'm not a JavaScript expert, my level of knowledge rather very low. I'm just trying to use existing solution and I would be very happy if you can help me with that.

Please let me know if I can help you with solving this issue in any way.

Thanks,
Andrey.