A MongoDB collection doesn’t always accept newly inserted documents after TTL was set on the collection
I’m using MongoDB with a FastAPI application to manage an unverified_users_collection. I have set a TTL (Time-To-Live) index of one day on the createdAt field to automatically remove documents after 24 hours. Here’s a snippet of the TTL index creation: