Slow user collection on login

90 views
Skip to first unread message

David Andersson

unread,
Jul 15, 2014, 2:59:39 AM7/15/14
to meteo...@googlegroups.com
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,
David

--
David Andersson
dava...@gmail.com | +46-702-172280

Max Xu

unread,
Dec 29, 2014, 4:12:19 AM12/29/14
to meteo...@googlegroups.com
Have you found out what the problem was?
I've recently stumbled on the same issue. every subscription is waiting for this login method even though the user has already signed in.
Reply all
Reply to author
Forward
0 new messages