lot of memory consumption for nodebb
-
yes I have stop and start nodebb after applying that change but fix doesn't work
I have test to stop, buiild and restart = doesn't work. Same thing
Here the log @baris :
2024-11-13T22:54:00.304Z [4567/63935] - error: uncaughtException: Cannot read properties of null (reading 'topic') TypeError: Cannot read properties of null (reading 'topic') at notifyUids (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:31:23) at batch.processArray.interval (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:23:9) at exports.processArray (/home/xxxxxxxxxxx/nodebb/src/batch.js:97:9) at Object.wrapperCallback [as processArray] (/home/xxxxxxxxxxx/nodebb/src/promisify.js:46:11) at SocketHelpers.notifyNew (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:22:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 12) at async Promise.all (index 0) at async postTids (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:46:2) at async Scheduled.handleExpired (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:29:2) {"date":"Wed Nov 13 2024 23:54:00 GMT+0100 (Central European Standard Time)","error":{},"exception":true,"os":{"loadavg":[1.8,1.26,1.52],"uptime":8930.83},"process":{"argv":["/usr/local/bin/node","/home/xxxxxxxxxxx/nodebb/app.js"],"cwd":"/home/xxxxxxxxxxx/nodebb","execPath":"/usr/local/bin/node","gid":1000,"memoryUsage":{"arrayBuffers":30691261,"external":33347788,"heapTotal":230100992,"heapUsed":206517768,"rss":328486912},"pid":63935,"uid":1000,"version":"v18.19.1"},"stack":"TypeError: Cannot read properties of null (reading 'topic')\n at notifyUids (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:31:23)\n at batch.processArray.interval (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:23:9)\n at exports.processArray (/home/xxxxxxxxxxx/nodebb/src/batch.js:97:9)\n at Object.wrapperCallback [as processArray] (/home/xxxxxxxxxxx/nodebb/src/promisify.js:46:11)\n at SocketHelpers.notifyNew (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:22:14)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 12)\n at async Promise.all (index 0)\n at async postTids (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:46:2)\n at async Scheduled.handleExpired (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:29:2)","trace":[{"column":23,"file":"/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js","function":"notifyUids","line":31,"method":null,"native":false},{"column":9,"file":"/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js","function":"batch.processArray.interval","line":23,"method":"interval","native":false},{"column":9,"file":"/home/xxxxxxxxxxx/nodebb/src/batch.js","function":"exports.processArray","line":97,"method":"processArray","native":false},{"column":11,"file":"/home/xxxxxxxxxxx/nodebb/src/promisify.js","function":"Object.wrapperCallback [as processArray]","line":46,"method":"wrapperCallback [as processArray]","native":false},{"column":14,"file":"/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js","function":"SocketHelpers.notifyNew","line":22,"method":"notifyNew","native":false},{"column":5,"file":"node:internal/process/task_queues","function":"process.processTicksAndRejections","line":95,"method":"processTicksAndRejections","native":false},{"column":null,"file":null,"function":"async Promise.all","line":null,"method":"all","native":false},{"column":null,"file":null,"function":"async Promise.all","line":null,"method":"all","native":false},{"column":2,"file":"/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js","function":"async postTids","line":46,"method":null,"native":false},{"column":2,"file":"/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js","function":"async Scheduled.handleExpired","line":29,"method":"handleExpired","native":false}]} 2024-11-13T22:54:00.305Z [4567/63935] - error: TypeError: Cannot read properties of null (reading 'topic') at notifyUids (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:31:23) at batch.processArray.interval (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:23:9) at exports.processArray (/home/xxxxxxxxxxx/nodebb/src/batch.js:97:9) at Object.wrapperCallback [as processArray] (/home/xxxxxxxxxxx/nodebb/src/promisify.js:46:11) at SocketHelpers.notifyNew (/home/xxxxxxxxxxx/nodebb/src/socket.io/helpers.js:22:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 12) at async Promise.all (index 0) at async postTids (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:46:2) at async Scheduled.handleExpired (/home/xxxxxxxxxxx/nodebb/src/topics/scheduled.js:29:2) 2024-11-13T22:54:00.306Z [4567/63935] - info: [app] Shutdown (SIGTERM/SIGINT/SIGQUIT) Initialised. 2024-11-13T22:54:00.310Z [4567/63935] - info: [app] Web server closed to connections. 2024-11-13T22:54:00.430Z [4567/63935] - error: TypeError: Cannot read properties of null (reading 'user') at UserNotifications.sendTopicNotificationToFollowers (/home/xxxxxxxxxxx/nodebb/src/user/notifications.js:217:62) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0) 2024-11-13T22:54:00.448Z [4567/63935] - info: [app] Live analytics saved. 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.538Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.539Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.539Z [4567/63935] - error: MongoExpiredSessionError: Cannot use a session that has ended at applySession (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sessions.js:656:16) at Connection.command (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection.js:285:53) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/sdam/server.js:205:18 at Object.callback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:322:13) at ConnectionPool.processWaitQueue (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:540:33) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/cmap/connection_pool.js:205:37 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) 2024-11-13T22:54:00.547Z [4567/63935] - error: MongoNotConnectedError: Client must be connected before running operations at executeOperationAsync (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/operations/execute_operation.js:23:19) at /home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/operations/execute_operation.js:12:45 at maybeCallback (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/utils.js:270:21) at executeOperation (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/operations/execute_operation.js:12:38) at Collection.updateOne (/home/xxxxxxxxxxx/nodebb/node_modules/mongodb/lib/collection.js:201:57) at module.sortedSetAdd (/home/xxxxxxxxxxx/nodebb/src/database/mongo/sorted/add.js:20:46) at Object.wrapperCallback [as sortedSetAdd] (/home/xxxxxxxxxxx/nodebb/src/promisify.js:46:11) at Notifications.create (/home/xxxxxxxxxxx/nodebb/src/notifications.js:159:6) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async UserNotifications.sendTopicNotificationToFollowers (/home/xxxxxxxxxxx/nodebb/src/user/notifications.js:215:20) 2024-11-13T22:54:00.549Z [4567/63935] - info: [app] Database connection closed. 2024-11-13T22:54:00.549Z [4567/63935] - info: [app] Shutdown complete. [cluster] Child Process (63935) has exited (code: 1, signal: null)
-
@phenomlab said in lot of memory consumption for nodebb:
don't forget that your server is using a systemctl daemon for nodebb, so stopping and restarting from the command line won't help as it's already running under another PID
Nope I delete the nodebb daemon for manual starting
-
@baris said in lot of memory consumption for nodebb:
@DownPW, try again with https://github.com/NodeBB/NodeBB/commit/db291ecde11acac6671e551a3855b6e9e52cc86d, don't forget to restart after applying the change. Let me know if you get other crashes.
This fix seems to be working @baris
No nodebb crash and restart now , just these messages :
TypeError: Cannot read properties of undefined (reading 'image') at Object.buildEmoji (/home/xxxxxxxxxxx/nodebb/node_modules/nodebb-plugin-emoji/build/lib/parse.js:67:15) at parse (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:35:21) at ReactionsPlugin.getPostReactions [as method] (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:136:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fireMethod (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:224:11) at async Object.fireFilterHook [as filter] (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:255:12) at async Hooks.fire (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:192:17) at async Posts.getPostsByPids (/home/xxxxxxxxxxx/nodebb/src/posts/index.js:49:15) at async Topics.getTopicPosts (/home/xxxxxxxxxxx/nodebb/src/topics/posts.js:47:18) at async Promise.all (index 0) TypeError: Cannot read properties of undefined (reading 'image') at Object.buildEmoji (/home/xxxxxxxxxxx/nodebb/node_modules/nodebb-plugin-emoji/build/lib/parse.js:67:15) at parse (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:35:21) at ReactionsPlugin.getPostReactions [as method] (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:136:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fireMethod (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:224:11) at async Object.fireFilterHook [as filter] (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:255:12) at async Hooks.fire (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:192:17) at async Posts.getPostsByPids (/home/xxxxxxxxxxx/nodebb/src/posts/index.js:49:15) at async Topics.getTopicPosts (/home/xxxxxxxxxxx/nodebb/src/topics/posts.js:47:18) at async Promise.all (index 0) TypeError: Cannot read properties of undefined (reading 'image') at Object.buildEmoji (/home/xxxxxxxxxxx/nodebb/node_modules/nodebb-plugin-emoji/build/lib/parse.js:67:15) at parse (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:35:21) at ReactionsPlugin.getPostReactions [as method] (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:136:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fireMethod (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:224:11) at async Object.fireFilterHook [as filter] (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:255:12) at async Hooks.fire (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:192:17) at async Posts.getPostsByPids (/home/xxxxxxxxxxx/nodebb/src/posts/index.js:49:15) at async Topics.getTopicPosts (/home/xxxxxxxxxxx/nodebb/src/topics/posts.js:47:18) at async Promise.all (index 0) TypeError: Cannot read properties of undefined (reading 'image') at Object.buildEmoji (/home/xxxxxxxxxxx/nodebb/node_modules/nodebb-plugin-emoji/build/lib/parse.js:67:15) at parse (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:35:21) at ReactionsPlugin.getPostReactions [as method] (/home/xxxxxxxxxxx/nodebb/node_modules/@nodebb/nodebb-plugin-reactions/library.js:136:24) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fireMethod (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:224:11) at async Object.fireFilterHook [as filter] (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:255:12) at async Hooks.fire (/home/xxxxxxxxxxx/nodebb/src/plugins/hooks.js:192:17) at async Posts.getPostsByPids (/home/xxxxxxxxxxx/nodebb/src/posts/index.js:49:15) at async Topics.getTopicPosts (/home/xxxxxxxxxxx/nodebb/src/topics/posts.js:47:18) at async Promise.all (index 0)
It's better. Many thanks to you !!
I will come back to you if necessary
-
@phenomlab said in lot of memory consumption for nodebb:
@DownPW a rebuild of the emoji should fix that issue i think. I might be wrong.
nope doesn't work.