,
  • Global Moderator Guru

    One thing I noticed was that after recovering the assets and database onto a test server (see this) , the performance of the replica NodeBB install was painfully slow. After much searching and hair pulling, I found that the indexes seemed to be missing - a point which is referenced by NodeBB themselves here

    When I checked /api/recent it was indeed slow - like a snail. So, at their suggestion, I opened up mongodb and added the missing indexes

    db.objects.createIndex({ _key: 1, score: -1 }, { background: true });
    db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true });
    db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
    

    The difference is quite astonishing. Now it runs like the Ferrari I’ve come to love and respect ♥

    Might be useful for someone else in the same boat…

  • Topic has been marked as solved  phenomlab phenomlab 

If this thread resolved an issue for you, or was useful, why not buy me a coffee? It's a nice gesture, and there's other ways to donate if you wish 💗

Suggested Topics