Weird error on garbage collector

Showing 1-2 of 2 messages
Weird error on garbage collector Sergio Canales 1/7/13 2:24 PM
Hi all,

Has anyone encountered this error:

TypeError: Cannot use 'in' operator to search for 'issued' in null
at String.IN (native)
at Manager.garbageCollection (/node_modules/
at Timer. (native)
at Timer.ontimeout (timers.js:223:14)

It seems to be something related to the handshake that is cleaned up on the GarbageCollector method on manager.js file.

Here is a link to the pull request for this GC method (, can anyone tell me anything about this?

I've done a temporary fix by checking for null on that if condition, but something tells me there's something wrong going on somewhere else.


Re: Weird error on garbage collector Lassi Kinnunen 2/14/13 3:43 AM
earlier in the autumn it at least proved very tricky for us to get the built in redis clustering to work reliably so that the instances would stay in sync(it would leak rooms, sometimes).

our fix was to use redis-pub sub instead of rooms, while waiting for proper cluster support for redis pubsub is fairly simple and ended up being almost as much/little code as doing it via the provided redis support and this has provided us with crash/leak free environment running for several months.


On Monday, January 28, 2013 10:11:48 PM UTC+2, wrote:

I am seeing here exactly the same problem.

Our setup:
- 4 servers with node.js, and redis-store
- ELB with tcp forwarding
- slightly higher load (especially xhr-polling) because we got mentioned in Argentinian TV

The behaviour seems a bit random and it's difficult to reproduce. But starting 8-12 servers and connecting with some xhr-polling clients reproduces the exceptions reliable. Our hypothesis until now is that the high concurrency of servers corrupt somehow the manager.handshaken object.

Some more observations which might be helpful:
- I see pretty much every time discrepancies between sockets.clients() output of the different servers. Shouldn't it be that they return the same in all servers?
-  Sometimes we not only get the error: "Cannot use 'in' operator to search for 'issued' in null" but also "Cannot use 'in' operator to search for 'issued' in undefined". The undefined here is pretty strange, looking at the code I can't find any reason why handshaken should be undefined.

We have really issues scaling our app and hoped on the redis backend but it seems that this won't work. Any ideas if there is any chance to fix the redis-store any time soon? Or is it that we do something fundamentally wrong?