Error: Error setting TTL index on collection : sessions
See original GitHub issueHi, When My App Tries To Connect To The DB I Get This Error:
/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:529
throw err;
^
Error: Error setting TTL index on collection : sessions
at module.exports._get_collection (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/lib/connect-mongo.js:137:23)
at Db.ensureIndex (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1227:28)
at Db.indexInformation (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1371:30)
at Cursor.toArray (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:156:22)
at Cursor.nextObject.self.queryRun (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:611:39)
at Cursor.close (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:939:5)
at Cursor.nextObject.commandHandler (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/cursor.js:611:21)
at Db._executeQueryCommand (/Users/Ari/Dev/ArisGame/node_modules/connect-mongo/node_modules/mongodb/lib/mongodb/db.js:1709:18)
at g (events.js:192:14)
at EventEmitter.emit (events.js:126:20)
I’m Sorry, This Is All I Really Know
Issue Analytics
- State:
- Created 10 years ago
- Comments:32 (2 by maintainers)
Top Results From Across the Web
MongoDB: Error setting TTL index on collection : sessions
I'm handling my session store with Mongo and as I understand it, the TTL index is used to make the session data expire....
Read more >Error setting TTL index on collection : sessions · Issue #514 ...
Hi, I've had the error MongoDB: Error setting TTL index on collection : sessions change from // Express/Mongo session storage ...
Read more >Error setting TTL index on collection : sessions <Error: no open ...
Hi Smita. The first problem should be solved by setting {auto_reconnect : true} for your express sessions store. The second problem is caused...
Read more >Error setting TTL index on collection : sessions-node.js
The solution is to wait for the connection to occur before allowing your application to start listening.
Read more >TTL Indexes — MongoDB Manual
A background thread in mongod reads the values in the index and removes expired documents from the collection. When the TTL thread is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi everyone, I tried to install traider.io in my local machine and I also met this error:
After searched, as I know because the version of connect-mongo & mongodb is not compatible. So, in my case, I re-installed mongodb with this version & it works:
Hope this help for someone like me 😃
Hello,
You should upgrade your connect-mongo version! Le lun. 29 août 2016 à 05:07, my1GitHub notifications@github.com a écrit :