Skip to content

RedisStore leaks Pub/Sub channels (with test case) #1090

@shapeshed

Description

@shapeshed

I have created a simple test case to demonstrate that RedisStore is leaking pubsub channels when using xhr-polling on both a single and clustered processes. This uses the following versions.

  • Node 0.8.14
  • Socket.IO 0.9.11

The test starts a stripped down Socket.IO server and then another process connects 100 xhr-polling clients at a rate of 1 per second. The server logs Redis Pub/Sub data and the number of connected sockets.

Single Process

The single process uses this server. On a single process here are the results of the test showing leaking Pub/Sub channels.

xhr polling single process

I have created a patch for this. Here are the results of the test using the patch

xhr polling single process with patch

Clustered processes

The Clustered process test uses this server. Here is a graph of one of two processes showing leaking Pub/Sub channels and connections.

xhr polling clustered

Results with the patch show connections are removed ok but Pub/Sub channels still leak.

xhr polling clustered

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions