Skip to content
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

Express session-store memory-leak #451

Closed
fcaps opened this issue Nov 10, 2023 · 1 comment · Fixed by #472
Closed

Express session-store memory-leak #451

fcaps opened this issue Nov 10, 2023 · 1 comment · Fixed by #472

Comments

@fcaps
Copy link
Collaborator

fcaps commented Nov 10, 2023

starting the docker image with "NODE_ENV=production" was logging something we should pay attention to.

Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.

could be fixed with something like this, but didn't had the time to dive into it.

@fcaps
Copy link
Collaborator Author

fcaps commented Nov 11, 2023

update:
working locally with a in-memory sessions is a PITA, if nodemon detects a change in the code it reloads the server, resulting in a session loss -> so, every time you have to work on something with a logged in user in the frontend, you need to login again.

Options 1:
local persistence, something like FileStorage

Option 2:
using a external service (maria, redis etc.), see list of supported backends

Option 3:
mixed backends for local-dev and production, local=FileStorage, production=InMemory.

fcaps added a commit to fcaps/website that referenced this issue Nov 18, 2023
Brutus5000 pushed a commit that referenced this issue Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant