Skip to content
  • Home
  • Categories
  • Recent
  • Popular
  • World
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
v3.10.3 Latest
Buy Hosting
  1. Home
  2. General Discussion
  3. NodeBB slow after website have over 60k topic

NodeBB slow after website have over 60k topic

Scheduled Pinned Locked Moved General Discussion
9 Posts 2 Posters 257 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    duyanhstar
    wrote last edited by duyanhstar
    #1

    Dear friend,

    i'm testing NodeBB on server: 64GB RAM with 6C/12T dedicate server, 512GB NVME.

    I see problem when i have over 60k topic!
    My greenshot

    Testing case:

    1. Site load very fast if i don't login.
    2. Register slow.
    3. Login with any user, loading page very slow.
    

    When i check DB, i see NodeBB use one colum for everything which is problem? any sugest for my case?
    I try with method:

    1 server for mongoDB
    1 server for redis session.
    

    Config.json

    {
    	"url": "https://nodebbv2.servicesio.com",
    	"secret": "f3e455ac-0a49-4d8d-b70f-50f99c6998aa",
    	"database": "redis",
    	"mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "nodebb",
            "password": "nodebb",
            "database": "nodebb",
            "uri": ""
        },
    	"port": ["4567", "4568" , "4569"],
    	"bcrypt_rounds": "21",
    	"bind_address": "0.0.0.0",
    	"isCluster": "false",
    	"session_store": {
           "name": "redis",
           "host":"127.0.0.1",
           "port":"6379",
           "password": "",
           "database": "1"
    	}
    }
    

    Problem is same and i don't see any error log ( test with:. ./nodebb start or node app.js)

    1 Reply Last reply
    0
    • barisB Offline
      barisB Offline
      <baris> NodeBB
      wrote last edited by baris
      #2

      @duyanhstar can you try something for me? Can you change this line to return await db.getSortedSetRevRangeByScoreWithScores(keys, 0, 200, '+inf', params.cutoff); and let me know what happens when you try with a logged in user?

      D 1 Reply Last reply
      2
      • D Offline
        D Offline
        duyanhstar
        replied to <baris> last edited by
        #3

        @baris said in NodeBB slow after website have over 60k topic:

        return await db.getSortedSetRevRangeByScoreWithScores(keys, 0, 200, '+inf', params.cutoff);

        yes! it work perfect, so fast now

        1 Reply Last reply
        1
        • barisB Offline
          barisB Offline
          <baris> NodeBB
          wrote last edited by
          #4

          I am going to do do some testing but this was likely happening because you had 30k topics imported and they were all considered unread(since they are all in the unread cutoff date limit of 2 days). And that line of code was loading all those topic ids.

          D 1 Reply Last reply
          1
          • D Offline
            D Offline
            duyanhstar
            replied to <baris> last edited by
            #5

            @baris i got it, thanks for your knowledge

            1 Reply Last reply
            0
            • D Offline
              D Offline
              duyanhstar
              wrote last edited by duyanhstar
              #6

              hi @baris

              have you think this case effect to register/login for new user?

              i try to register user, it's very slow for loading after i submit ( i use Cloudflare proxy).

              I get timeout and see new user on /admin/manage/users but i can't login with this user.

              Screenshot 2024-10-22 at 21.41.03.png

              1 Reply Last reply
              0
              • barisB Offline
                barisB Offline
                <baris> NodeBB
                wrote last edited by
                #7

                You have to debug and see what's taking so long in that route. Run a local nodebb with the same database and plugins and then setup some breakpoints in the register/complete route if that's timing out.

                D 1 Reply Last reply
                0
                • D Offline
                  D Offline
                  duyanhstar
                  replied to <baris> last edited by
                  #8

                  @baris when i use IP direct, i can register account, but it's very very slow ( timing out when using CF).

                  i try to run with ./nodebb dev , but it don't show any log.
                  Screenshot_1.png

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    duyanhstar
                    wrote last edited by
                    #9

                    wow, i got it. problem from this option in config.json

                    "bcrypt_rounds": "21",
                    
                    1 Reply Last reply
                    0

                    Copyright © 2024 NodeBB | Contributors
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    Powered by NodeBB Contributors
                    • First post
                      Last post
                    0
                    • Home
                    • Categories
                    • Recent
                    • Popular
                    • World
                    • Top
                    • Tags
                    • Users
                    • Groups
                    • Documentation
                      • Home
                      • Read API
                      • Write API
                      • Plugin Development