A
A
Alexander Wolf2013-04-23 13:47:02
JavaScript
Alexander Wolf, 2013-04-23 13:47:02

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 ).
Screenshot53156.png
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

2 answer(s)
T
Tenkoff, 2013-04-27
@mannaro

github.com/kcbanner/connect-mongo/blob/master/lib/connect-mongo.js#L23 - to help you.

I
Ilya Sevostyanov, 2013-04-23
@RUVATA

keep-alive ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question