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💗

  • 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
    136 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.

  • 3 Votes
    16 Posts
    444 Views

    @phenomlab
    Ah, got it working!
    I reversed the CSS addition to put z index high, and then I could see another error box saying fork title must be at least 3 characters.
    So made the new fork title longer and button responded.

  • 0 Votes
    2 Posts
    149 Views

    @eeeee they are nothing to worry about, and can be ignored.

  • NodeBB: Consent page

    Solved Configure
    16
    4 Votes
    16 Posts
    552 Views

    @DownPW I still do not see any issues.

  • 1 Votes
    1 Posts
    87 Views
    No one has replied
  • nodebb loading emojis

    Solved Configure
    16
    1 Votes
    16 Posts
    449 Views

    @DownPW sure. Let me have a look at this in more detail. I know nginx plus has extensive support for this, but it’s not impossible to get somewhere near acceptable with the standard version.

    You might be better off handling this at the Cloudflare level given that it sits in between the requesting client and your server.

  • 3 Votes
    4 Posts
    594 Views

    @crazycells hi - no security reason, or anything specific in this case. However, the nginx.conf I posted was from my Dev environment which uses this port as a way of not interfering with production.

    And yes, I use clustering on this site with three instances.