Issues with NodeBB perfomance
-
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
-
Thread can be locked.
-
Sry to answer on post, but i have the same error on my forum.
@julian said in Issues with NodeBB perfomance:
@Lukas-Urbonas Already confirmed fixed in latest version.
I have the latest version 1.0.2, I saw the 1.0.3 tag on github the fix is in it ?
The bug is really bad, we can't use the forum