• Home
  • Categories
  • Recent
  • Popular
  • 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
v3.5.2 Latest
Buy Hosting

[Solved] New nodebb install running very slow

Scheduled Pinned Locked Moved General Discussion
22 Posts 6 Posters 7.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by
    #1

    So in my learning as I'm going development of a site for a group of friends I set up a digital ocean droplet (the smallest size one) and install the ghost blog platform on the main domain and nodebb for the forum. subdomain and the reverse proxy stuff is being handled by nginx. However with this install I'm having an issue with nodebb running very slowly, for example when I launched it for the first time and went to the forum.domain.com address the top navigation bar loaded pretty much straight away but the categories didn't for about 8 seconds.

    Now this is the first time I've had more than one node.js app running on the same VPS so I'm wondering if I need to use a bigger droplet (Though I did try a 2 core 2Gb resize though that seemed to make no difference) or if I've screwed up the nginx setup somehow (though I would have thought that would slow down the ghost blog as well, which is running fine.) or if something else I can't even think of is happening (likely, I am not a bright man).

    Any help/thoughts would be appreciated.

    1 Reply Last reply
    0
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by Sp4rkR4t
    #2

    Actually playing around with it a bit more the slowdown is ONLY occuring when I go back to the main landing page of the forum, it loads in the nav bar then you are sat there waiting for a few seconds before it pops the rest in, also the nav bar doesn't show you as logged in until the delay is over.

    Everything else is lightning fast as always.

    1 Reply Last reply
    0
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by
    #3

    Also noticed this in the admin panel which I think is different from normal, are they meant to be so many active users when the admin account is the only one created so far?

    error.jpg

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

    About active users that title is misleading. That section shows active sockets in rooms. You probably have 4 sockets active in those rooms. Can you check your network tab and see if the slowdown is caused by an xhr call on the homepage? Are sockets working as they should instead of falling back to xhr?

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #5

    Yeah, a @baris mentioned, it sounds like websockets isn't working properly. Are you perchance using CloudFlare as well?

    1 Reply Last reply
    0
  • F Offline
    F Offline
    finid
    wrote on last edited by
    #6

    @julian

    I'm not using any external service, but I'm getting the same message in my ACP about Active Users X socket connections.

    1 Reply Last reply
    0
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by Sp4rkR4t
    #7

    @baris said:

    Can you check your network tab and see if the slowdown is caused by an xhr call on the homepage? Are sockets working as they should instead of falling back to xhr?

    Sorry but where is this network tab?

    @julian said:

    Yeah, a @baris mentioned, it sounds like websockets isn't working properly. Are you perchance using CloudFlare as well?

    No just a digital ocean droplet, nothing special at all. Is there any special setup I need to do to my nginx settings to enable websockets?

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

    I meant the network tab of the browser. F12 to open it up if on chrome. I think you need nginx 1.3 or greater for proper websocket support. @julian can correct me if im wrong.

    1 Reply Last reply
    0
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by
    #9

    @baris Ok yes it's falling back on xhr.

    I have managed to update my nginx to 1.4.5 which has websocket support but I'm still facing the same issue, it's obviously something with the config so will look into that.

    1 Reply Last reply
    0
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by
    #10

    FIXED IT!

    Just need to add some extra proxy settings to my sites configuration in nginx once I was on a suitably up to date version. 🙂

    Thanks for the pointers. 👍

    F 1 Reply Last reply
    1
  • F Offline
    F Offline
    finid
    replied to Sp4rkR4t on last edited by
    #11

    @Sp4rkR4t

    What were those "extra proxy settings"?

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #12

    I'm assuming they were these:

    # Socket.IO Support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade"
    
    N WatchopolisW 2 Replies Last reply
    2
  • Sp4rkR4tS Offline
    Sp4rkR4tS Offline
    Sp4rkR4t
    wrote on last edited by
    #13

    Yes, that's them alright. 🙂

    1 Reply Last reply
    0
  • N Offline
    N Offline
    Nicekiwi
    replied to julian on last edited by
    #14

    @julian said:

    I'm assuming they were these:

    # Socket.IO Support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade"
    

    awe man, 😞 I have those same settings and also getting really bad performance.

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #15

    @Ezra-Sharp What's your nginx version? Should be > v1.3.13

    1 Reply Last reply
    0
  • N Offline
    N Offline
    Nicekiwi
    wrote on last edited by
    #16

    Nginx 1.4.7

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #17

    Hm... got a link to your site running live? I'd like to see this for myself...

    1 Reply Last reply
    0
  • WatchopolisW Offline
    WatchopolisW Offline
    Watchopolis
    replied to julian on last edited by
    #18

    @julian im having the same problem but for apache, i need some help pls

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #19

    @Watchopolis Hm, I'm getting a websocket error. Did you follow this guide to set up the proxy for Apache?

    WatchopolisW 1 Reply Last reply
    0
  • WatchopolisW Offline
    WatchopolisW Offline
    Watchopolis
    replied to julian on last edited by Watchopolis
    #20

    @julian yes i followed everything step by step,

    look here on the sidebar stats, the numbers are loading after 6 seconds when the page fully loads

    btw i dont have proxy_wstunnel installed because i am using vestacp

    if i follow this guide will it break my vestacp ?

    1 Reply Last reply
    0

Copyright © 2023 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
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development