TTL issues in mongo

Hello @Shubham_Shailesh_Doijad

The system collection system.sessions that is in the config database has a TTL index, the expireAfterSeconds for that is 1800. If you have no other collections with TTL indexes this could be why.

s0 [direct: primary] test> db.getSiblingDB('config').system.sessions.getIndexes()
[
  { v: 2, key: { _id: 1 }, name: '_id_' },
  {
    v: 2,
    key: { lastUse: 1 },
    name: 'lsidTTLIndex',
    expireAfterSeconds: 1800
  }
]

https://www.mongodb.com/docs/manual/reference/config-database/#mongodb-data-config.system.sessions

2 Likes