-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
💾 feat: Production-ready Memory Store for express-session
#5212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💾 feat: Production-ready Memory Store for express-session
#5212
Conversation
The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
We have the problem that the session is undefined sometimes. I found a similar problem on https://stackoverflow.com/questions/63259184/node-with-express-session-issue but there is no working solution. It seems to be a race condition. I hope the new memory store solves this problem. Logs
|
express-session
* ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in #5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
…a#5212) The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
…#5246) * ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in danny-avila#5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
…a#5212) The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
…#5246) * ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in danny-avila#5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
…a#5212) The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
…#5246) * ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in danny-avila#5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
…a#5212) The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
…#5246) * ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in danny-avila#5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also #1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
* ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in #5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
…a#5212) The `express-session` library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled: Warning: connect.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not scale past a single process. LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service. This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from `express-session`¹. You can still configure Redis, but this provides a simple, good default for everyone else. See also danny-avila#1014 ¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
…#5246) * ✨ feat: Add OpenWeather Tool for Weather Data Retrieval 🌤️ * chore: linting * chore: move test files * fix: tool icon, allow user-provided keys, conform to app key assignment pattern * chore: linting not included in danny-avila#5212 --------- Co-authored-by: Jonathan Addington <[email protected]>
The
express-session
library comes with a session storage meant for testing by default. That is why you get a message like this when you start up LibreChat with OIDC enabled:LibreChat can already use Redis as a session storage, although Redis support is still marked as experimental. It also makes the set-up more complex, since you will need to configure and run yet another service.
This pull request provides a simple alternative by using a in-memory session store marked as a production-ready alternative by the guys from
express-session
¹. You can still configure Redis, but this provides a simple, good default for everyone else.See also #1014
¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
Change Type
Please delete any irrelevant options.
Testing