Issues with NodeBB perfomance
-
@Lukas-Urbonas do you see any errors in NodeBB logs or browser console?
-
28/3 12:10 [4224] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised.
28/3 12:10 [4224] - [32minfo[39m: [app] Database connection closed.
28/3 12:10 [4224] - [32minfo[39m: [app] Web server closed to connections.
28/3 12:10 [4224] - [32minfo[39m: [app] Shutdown complete.
[cluster] Child Process (4224) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
28/3 12:10 [6182] - [32minfo[39m: Time: Mon Mar 28 2016 12:10:36 GMT-0400 (EDT)
28/3 12:10 [6182] - [32minfo[39m: Initializing NodeBB v1.0.2
28/3 12:10 [6182] - [33mwarn[39m: You have no mongo password setup!
28/3 12:10 [6182] - [32minfo[39m: [database] Checking database indices.
28/3 12:10 [6182] - [33mwarn[39m: [socket.io] Clustering detected, you are advised to configure Redis as a websocket store.28/3 12:10 [6182] - [33mwarn[39m: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run
./nodebb reset -p PLUGINNAME
to disable it.- nodebb-plugin-shoutbox
28/3 12:10 [6182] - [33mwarn[39m: [plugins] Skipping /root/nodebb/node_modules/nodebb-plugin-header-extend/public/templates/admin/plugins/script.js by plugin nodebb-plugin-header-extend
28/3 12:10 [6182] - [33mwarn[39m: [plugins] Skipping /root/nodebb/node_modules/nodebb-plugin-header-extend/public/templates/admin/plugins/style.css by plugin nodebb-plugin-header-extend
28/3 12:10 [6182] - [32minfo[39m: NodeBB Ready
28/3 12:10 [6182] - [32minfo[39m: Enabling 'trust proxy'
28/3 12:10 [6182] - [32minfo[39m: NodeBB is now listening on: 0.0.0.0:4567
28/3 12:10 [6182] - [32minfo[39m: [Newsletter] Initializing Newsletter... -
blacklist returned: undefined
28/3 12:04 [4224] - [31merror[39m: /register
invalid csrf token
28/3 12:04 [4224] - [31merror[39m: /login
invalid csrf token
28/3 12:10 [4224] - [31merror[39m: TypeError: Cannot read property 'replace' of undefined
at S.decodeHtmlEntities (/root/nodebb/node_modules/string/lib/string.js:140:12)
at /root/nodebb/src/notifications.js:453:60
at Array.forEach (native)
at /root/nodebb/src/notifications.js:426:20
at Array.reduce (native)
at Object.Notifications.merge (/root/nodebb/src/notifications.js:403:28)
at /root/nodebb/src/user/notifications.js:96:19
at fn (/root/nodebb/node_modules/async/lib/async.js:746:34)
at /root/nodebb/node_modules/async/lib/async.js:1213:16
at /root/nodebb/node_modules/async/lib/async.js:166:37
at /root/nodebb/node_modules/async/lib/async.js:706:43
at /root/nodebb/node_modules/async/lib/async.js:167:37
at /root/nodebb/node_modules/async/lib/async.js:1209:30
at /root/nodebb/src/user/notifications.js:139:4
at /root/nodebb/src/user/notifications.js:185:5
at /root/nodebb/node_modules/async/lib/async.js:726:13
TypeError: Cannot read property 'replace' of undefined
at S.decodeHtmlEntities (/root/nodebb/node_modules/string/lib/string.js:140:12)
at /root/nodebb/src/notifications.js:453:60
at Array.forEach (native)
at /root/nodebb/src/notifications.js:426:20
at Array.reduce (native)
at Object.Notifications.merge (/root/nodebb/src/notifications.js:403:28)
at /root/nodebb/src/user/notifications.js:96:19
at fn (/root/nodebb/node_modules/async/lib/async.js:746:34)
at /root/nodebb/node_modules/async/lib/async.js:1213:16
at /root/nodebb/node_modules/async/lib/async.js:166:37
at /root/nodebb/node_modules/async/lib/async.js:706:43
at /root/nodebb/node_modules/async/lib/async.js:167:37
at /root/nodebb/node_modules/async/lib/async.js:1209:30
at /root/nodebb/src/user/notifications.js:139:4
at /root/nodebb/src/user/notifications.js:185:5 -
@Lukas-Urbonas before I can send you a proper config file make sure your
nginx.conf
looks like this:user www-data; worker_processes 2; pid /run/nginx.pid; events { use epoll; worker_connections 16384; multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings ## # access_log /var/log/nginx/access.log; # error_log /var/log/nginx/error.log; ## # Gzip Settings ## # gzip on; # gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/sites-enabled/*; }
Some parameters maybe need to be edited for your use case, however, there shouldn't be any issues with the config above.
Now create a folder calledsites-enabled
in/etc/nginx
. Create a file namedotaku.conf
with this conntent:# Force SSL server { listen 80; server_name www.otaku.lt otaku.lt; access_log off; error_log off; root /root/nodebb; # Max Upload client_max_body_size 100M; # Gzip gzip on; gzip_disable "msie6"; gzip_vary on; gzip_comp_level 6; gzip_min_length 1500; gzip_proxied any; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; # Stats # location /nginx_status { # stub_status on; # } # NodeBB location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://io_nodes; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # Cache location ~* .(jpg|jpeg|png|gif|ico|css|js)$ { expires 1y; } } # Close Server # NodeBB Upstream upstream io_nodes { ip_hash; server 127.0.0.1:4567; keepalive 120; }
Restart NGINX.
General advice of mine:
Do not run the forum in the /root directory. I am also assuming you are using the root user to run your NodeBB instance, which is an additional security risk. -
@Lukas-Urbonas your installation is crashing with an error when you open the notifications dropdown.
the title of this topic is misleading. it doesn't have anything to do with your issue and the issue has nothing to do with Apache/Nginx either.
-
@AOKP Thanks, but my website quite broken now. Was It because of new settings or I moved to new user? (I can't access to .css files, it says forbidden, you can see it by yourself.) I made chown to give permission to that new user.
-
-
@Lukas-Urbonas Mabye I can help you
-
@arionkurtaj so tell me what I should do.
-
Echoring @pichalite's quote:
your installation is crashing with an error when you open the notifications dropdown.
the title of this topic is misleading. it doesn't have anything to do with your issue and the issue has nothing to do with Apache/Nginx either.Hi @Lukas-urbonas, please let me know your git hash... it is possible we have fixed this bug already.
-
@Lukas-Urbonas Is your host giving you any errors
-
@arionkurtaj Well my .css files not working it says not found.
-
@Lukas-Urbonas Can I see a screen shot of the error
-
Nothing special just 404 nginx error when I go to css file directly by viewing page source code.
-
@Lukas-Urbonas What's the site
-
@arionkurtaj I have disabled it, since it's not working properly. But I'm still seeking for help.
-
@Lukas-Urbonas What is your problem please explain in detail
-
@julian Hi