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

When session store not ready, just return 500 #1000

Closed
wants to merge 2 commits into from
Closed

When session store not ready, just return 500 #1000

wants to merge 2 commits into from

Conversation

dead-horse
Copy link

When session lose efficacy, almost every server will just 500
but if you just call next(), not everyone know req.session
can be empty, and their servers will crash by using req.session.key

When session lose efficacy, almost every server will just 500
but if you just call `next()`, not everyone know `req.session`
can be empty, and their servers will crash by using `req.session.key`
@JacksonTian
Copy link
Contributor

test case!

@rlidwka
Copy link
Contributor

rlidwka commented Jan 20, 2014

shouldn't it wait for the store instead?

@dead-horse
Copy link
Author

@rlidwka
I think in most of the situation, when the store is down, it can not recover soon. Maybe we do not need to wait for store reconnect.
If it really reconnect soon. user refresh the page, everything work fine.

Also, if the website is under a huge traffic, we can't make all of the requests wait.

@jonathanong
Copy link
Contributor

sessions has moved to https://github.com/expressjs/session. i've added @dead-horse to the team, so feel free to make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants