> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# session-memory-store

> An express-session middleware has no store, so sessions live in process memory.

## What it flags

`express-session` or `@fastify/session` is set up without a `store`, or with an explicit `store: new session.MemoryStore()`, so sessions live in process memory: they leak, are lost on restart and are not shared across instances.

```js theme={null}
session({ secret: 's' });
session({ secret: 's', store: new session.MemoryStore() });
```

Options that may be mutated after creation or may inherit a store through `__proto__` are skipped.

## How to review or fix

Pass a shared store such as connect-redis or connect-pg-simple.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "session-memory-store": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.