Answer the question
In order to leave comments, you need to log in
500 Error: Connection closed (Express)?
Hello! If I keep the tab with the site on node.js open long enough (~ 30 min), and then refresh, then I see a 500 error, namely Connection closed.
I use Mongodb as a database. As a library for working with it - Mongoose. I store sessions in the database using the connect-mongo library ( github ).
Screenshot
I suspect that the error is in connect-mongo (maybe there is a better combination of express + mongoose + sessions).
UPD: Session lifetime ~ half a month (in the database) and until the client closes the browser.
Answer the question
In order to leave comments, you need to log in
github.com/kcbanner/connect-mongo/blob/master/lib/connect-mongo.js#L23 - to help you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question