Hi,
I'm creating a plugin which create a home page for NodeBB with router: home
I get this problem when nodebb loading page
Hi,
I'm creating a plugin which create a home page for NodeBB with router: home
I get this problem when nodebb loading page
Dear Team,
I have a question for change content of this UI!
i want to change from this UI
to same UI ( I want to show Thumb, title, date post, category)
thanks you so much!
@baris said in Logic datasync Redis and Mongo have issues and solution for high traffic?:
You are running more than 1 port so remove
"isCluster": "false",
or set it to true.
I have a question more for using balancer loading on 5 dedicated servers.
Dedicated server 1: I setup nodebb run 3 on this port: 8900, 8901, 8902
{
"url": "https://mydomain",
"secret": "mykey",
"database": "mongo",
"mongo": {
"host": "{server_DB}",
"port": "27017",
"username": "nodebb",
"password": "nodebb",
"database": "nodebb",
"uri": ""
},
"port": ["8900","8901","8902"],
"bcrypt_rounds": "21",
"bind_address": "127.0.0.1",
"isCluster": "true",
"upload_path":"/home/public/uploads",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "",
"database": "2"
},
"session_store": {
"name": "redis",
"host":"127.0.0.1",
"port":"6379",
"password": "",
"database": "1",
"tls": {}
}
}
Dedicated server 2, 3 , 4, 5: i use one port: 8900. Then config on per server is
{
"url": "https://mydomain",
"secret": "mykey",
"database": "mongo",
"mongo": {
"host": "{server_DB}",
"port": "27017",
"username": "nodebb",
"password": "nodebb",
"database": "nodebb",
"uri": ""
},
"port": ["8900"],
"bcrypt_rounds": "21",
"bind_address": "127.0.0.1",
"isCluster": "false",
"upload_path":"/home/public/uploads",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "",
"database": "2"
},
"session_store": {
"name": "redis",
"host":"127.0.0.1",
"port":"6379",
"password": "",
"database": "1",
"tls": {}
}
}
I config true, right? What happending if a user upload a file to NodeBB, this file will be storaged on one server or 5 servers?
i'm using NodeBB v3.10.3. Popular work well when i start to use.
In the one day, i don't know why Popular don't work although i try to click to topics for update topics views.
Site don't show any data when i chose: day, week, month
When i chose: All time, site response data but it's not true by views.
this is my congfig:
{
"url": "https://mywebsite",
"secret": "{mykey}",
"database": "mongo",
"mongo": {
"host": "{ip}",
"port": "27017",
"username": "nodebbv3",
"password": "mypass",
"database": "nodebbv3",
"uri": ""
},
"port": ["4567","4568","4569"],
"bind_address": "0.0.0.0",
"isCluster": "true",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "mypass",
"database": "2"
},
"upload_path":"/public/uploads",
"session_store": {
"name": "redis",
"host":"127.0.0.1",
"port":"6379",
"password": "mypass",
"database": "1",
"tls": {}
}
}
today, i get same problem.
in this file: src/controllers/uploads.js:154
uploadsController.uploadFile = async function (uid, uploadedFile) {
if (plugins.hooks.hasListeners('filter:uploadFile')) {
return await plugins.hooks.fire('filter:uploadFile', {
file: uploadedFile,
uid: uid,
folder: 'files',
});
}
if (!uploadedFile) {
throw new Error('[[error:invalid-file]]');
}
const isAdmin = await user.isAdministrator(uid);
if (!isAdmin && uploadedFile.size > meta.config.maximumFileSize * 1024) {
throw new Error(`[[error:file-too-big, ${meta.config.maximumFileSize}]]`);
}
const allowed = file.allowedExtensions();
const extension = path.extname(uploadedFile.name).toLowerCase();
if (allowed.length > 0 && (!extension || extension === '.' || !allowed.includes(extension))) {
throw new Error(`[[error:invalid-file-type, ${allowed.join(', ')}]]`);
}
const currentDate = new Date();
const year = currentDate.getFullYear() + '';
const month = String(currentDate.getMonth() + 1).padStart(2, '0') + '';
const date = String(currentDate.getDate()).padStart(2, '0') + '';
const random = Math.random().toString(36).substring(2, 4);
const dirPath = path.join('files', year, month, date, random);
return await saveFileToLocal(uid, dirPath, uploadedFile);
};
i thinks this is good for files manager
wow, i got it. problem from this option in config.json
"bcrypt_rounds": "21",
@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.
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.
how this plugin work?
ex: how a user can get a point and their level will be upgraded?
Anyone can help me to understand it?
This is my config for mongo and redis:
{
"url": "https://mydomain",
"secret": "mykey",
"database": "mongo",
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "nodebb",
"password": "nodebb",
"database": "nodebb",
"uri": ""
},
"port": ["8900","8901","8902"],
"bcrypt_rounds": "21",
"bind_address": "127.0.0.1",
"isCluster": "false",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "",
"database": "2"
},
"session_store": {
"name": "redis",
"host":"127.0.0.1",
"port":"6379",
"password": "",
"database": "1",
"tls": {}
}
}
I see a problem with data on NodeBB, ex: when i change site title in /admin/settings/general, it effect is true on FE and Admin. After 5 mins ( around), title will be changed to site title old, after 5 or 10 mins more, site title new back. Maybe, logic sync is not true?
Shooud i use "session_store" redis server for scale up with 10k users realtime? ( just thinking)
@baris i got it, thanks for your knowledge
@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
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!
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)
@baris i don't think so!
I see this case:
System load slow after you login admin, it effect all everyone.
System fast if you don't login.
i see a log:
WARNING in ./node_modules/fetch-cookie/node_modules/tough-cookie/lib/utilHelper.js 4:11-26
Module not found: Error: Can't resolve 'util' in '/home/nodebb/node_modules/fetch-cookie/node_modules/tough-cookie/lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
- install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "util": false }
ERROR in node:url
Module build failed: UnhandledSchemeError: Reading from "node:url" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
at /home/nodebb/node_modules/webpack/lib/NormalModule.js:973:10
at Hook.eval [as callAsync] (eval at create (/home/nodebb/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/nodebb/node_modules/tapable/lib/Hook.js:18:14)
at Object.processResource (/home/nodebb/node_modules/webpack/lib/NormalModule.js:969:8)
at processResource (/home/nodebb/node_modules/loader-runner/lib/LoaderRunner.js:220:11)
at iteratePitchingLoaders (/home/nodebb/node_modules/loader-runner/lib/LoaderRunner.js:171:10)
at runLoaders (/home/nodebb/node_modules/loader-runner/lib/LoaderRunner.js:398:2)
at NormalModule._doBuild (/home/nodebb/node_modules/webpack/lib/NormalModule.js:959:3)
at NormalModule.build (/home/nodebb/node_modules/webpack/lib/NormalModule.js:1144:15)
at /home/nodebb/node_modules/webpack/lib/Compilation.js:1418:12
This is my config.json
{
"url": "http://mydomain",
"secret": "{myhash}",
"database": "mongo",
"port": ["9901", "9902", "9903", "9904", "9905", "9906", "9907", "9908", "9909"],
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "{user}",
"password": "{pass}",
"database": "{dbname}",
"uri": ""
},
"redis": {
"host":"127.0.0.1",
"port":"6379",
"database": 0
},
"max-memory":5000
}
Do you want to connect with me for get this case? i can provide SSH for you check details.
@julian NodeBB have a big problem when your forum storage over 30k topics thought your hardware is strong ( 128GB RAM - 48C/96T)
@baris how can i set limit on per page via API? i don't see on document
@baris Can you tell me what API can i use for get list? I don't see