visionmedia/express — Issue #917: exposing express session storage?
Author: furtivefelon
Created: 2011-12-03 22:00:09+00:00
State: open

Hey guys,

I am currently following this guide to allow socket.io to read express session storage: http://www.danielbaulig.de/socket-ioexpress/

Basically, I am using express.session.MemoryStore for session memory, and exposing that in a global variable that i can refer to in other places such as socket.io (for authentication)

However, the problem arise when i try to run the app in NODE_ENV=production, the app gives me the following warning:

Warning: connection.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and obviously only work within a single process.

Anyone have any idea of how to properly resolve this?

Thanks a lot :)

Jason