Skip to content

NodeBB slow after DB recovery

Solved Performance
  • One thing I noticed was that after recovering the assets and database onto a test server: (see below)

    https://sudonix.com/topic/239/testing-out-webdock-io

    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

    https://community.nodebb.org/topic/11299/slow-page-loading-on-digitalocean/12?_=1646060175987

    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…

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 17 Votes
    34 Posts
    2k Views

    @phenomlab thank you very much, this was helpful. Everything looks ok 🙂

  • 1 Votes
    23 Posts
    1k Views

    @DownPW it’s your only realistic option at this stage.

  • SEO and Nodebb

    Performance
    2
    2 Votes
    2 Posts
    142 Views

    @Panda It’s the best it’s ever been to be honest. I’ve used a myriad of systems in the past - most notably, WordPress, and then Flarum (which for SEO, was absolutely dire - they never even had SEO out of the box, and relied on a third party extension to do it), and NodeBB easily fares the best - see below example

    https://www.google.com/search?q=site%3Asudonix.org&oq=site%3Asudonix.org&aqs=chrome..69i57j69i60j69i58j69i60l2.9039j0j3&sourceid=chrome&ie=UTF-8#ip=1

    However, this was not without significant effort on my part once I’d migrated from COM to ORG - see below posts

    https://community.nodebb.org/topic/17286/google-crawl-error-after-site-migration/17?_=1688461250365

    And also

    https://support.google.com/webmasters/thread/221027803?hl=en&msgid=221464164

    It was painful to say the least - as it turns out, there was an issue in NodeBB core that prevented spiders from getting to content, which as far as I understand, is now fixed. SEO in itself is a dark art - a black box that nobody really fully understands, and it’s essentially going to boil down to one thing - “content”.

    Google’s algorithm for indexing has also changed dramatically over the years. They only now crawl content that has value, so if it believes that your site has nothing to offer, it will simply skip it.

  • 11 Votes
    47 Posts
    3k Views

    @DownPW Seems fine.

  • 1 Votes
    1 Posts
    88 Views
    No one has replied
  • 1 Votes
    5 Posts
    558 Views

    @DownPW very useful tip. Thanks

  • NodeBB 1.19.3

    Solved Performance
    33
    4 Votes
    33 Posts
    3k Views

    @phenomlab

    I find the problem Mark 😉

    The error message indicated this path :

    http://localhost:4567/assets/plugins/nodebb-plugin-emoji/emoji/styles.css?v=6983dobg16u

    I change the path url on config.json

    47bacc80-f141-41e4-a261-3f8d650cc6f6-image.png

    And all it’s good 🙂

    Weird, I didn’t have to change that path before 1.19.3

    But this does not prevent the problem from a clean install with Emoji Plugin

    EDIT: After test, that resolv the problem installation for 1.18.x but not for 1.19.x (I have other error message when I run ./nodebb Setup

    For resume: NodeJS 16_x with 1.18.x is ok

  • 0 Votes
    3 Posts
    681 Views

    Closing this thread as a duplicate of https://sudonix.com/topic/12/nodebb-customisation