I have a dedicated mongodb on
modulus.io and a deployed app there as well. For some reason, signing in takes a long time. Looking in Kadira, it seems everything is waiting for the login method. The trace says this:
Running the first fetch on users in a RoboMongo console: db.users.find({"services.resume.loginTokens.hashedToken":"/k4Y034QvcgXuvhSqEfUIxEmJI0DrkiwZQFGd2AMESU="}); takes 0.153 seconds.
There aren't many users, even though each user has many documents in other collections. From what I can see, there seems to be indices for the fetches.
"3" : {
"v" : 1,
"unique" : true,
"key" : {
"services.resume.loginTokens.hashedToken" : 1
},
"name" : "services.resume.loginTokens.hashedToken_1",
"ns" : "mydb.users",
"sparse" : 1
},
How can I improve the user fetch?
Thanks,