3.3.0 Upgrade Support
-
@baris I am still unable to do the upgrade.. the mongo connection goes down after several minutes running the update:
nodebb | Parsing upgrade scripts... nodebb | OK | 5 script(s) found, 124 skipped nodebb | → [2023/7/2] Update chat messages to add roomId field... nodebb | Error occurred [### ] (502/1775) 28% 2023-08-19T18:27:29.351Z [4567/10] - warn: NodeBB Setup Aborted. nodebb | MongoServerError: cursor id 8839582387884439579 not found nodebb | at Connection.onMessage (/usr/src/app/nodebb/node_modules/mongodb/lib/cmap/connection.js:202:26) nodebb | at MessageStream.<anonymous> (/usr/src/app/nodebb/node_modules/mongodb/lib/cmap/connection.js:61:60) nodebb | at MessageStream.emit (node:events:513:28) nodebb | at processIncomingData (/usr/src/app/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:124:16) nodebb | at MessageStream._write (/usr/src/app/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:33:9) nodebb | at writeOrBuffer (node:internal/streams/writable:392:12) nodebb | at _write (node:internal/streams/writable:333:10) nodebb | at Writable.write (node:internal/streams/writable:337:10) nodebb | at Socket.ondata (node:internal/streams/readable:766:22) nodebb | at Socket.emit (node:events:513:28) nodebb exited with code 1
I guess my only option is to remove chat messages. Is there any tool for this or am I gonna have to figure it out in the DB ? Can I just run a delete on
{_key:"message:*"}
where the timestamp is older than 1 month or something ?If I run this, would i break something ?
db.objects.deleteMany({ "_key": { "$regex": /^message:\d+$/ }, "timestamp": { "$lt": oneMonthAgoTimestamp } });
-
Looks like mongodb cursors have a lifetime of 10minutes so it might be throwing that error after that
Can you run this in your mongo cli?
db.objects.count({_key: "chat:room:<replace_with_global_chat_roomid>:uids"}); db.objects.count({_key: "uid:<replace_with_your_uid>chat:room:<replace_with_global_chat_roomid>:mids"});
So we can get an idea of how many users/messages are in that global chat room.
You can trim those zsets in mongo cli since this is most like only caused by that one room that has all users in the forum but that is a last resort.
-
@baris said in 3.3.0 Upgrade Support:
Looks like mongodb cursors have a lifetime of 10minutes so it might be throwing that error after that
Can you run this in your mongo cli?
db.objects.count({_key: "chat:room:<replace_with_global_chat_roomid>:uids"}); db.objects.count({_key: "uid:<replace_with_your_uid>chat:room:<replace_with_global_chat_roomid>:mids"});
So we can get an idea of how many users/messages are in that global chat room.
You can trim those zsets in mongo cli since this is most like only caused by that one room that has all users in the forum but that is a last resort.
![alt text]( image url)
This is after I removed messages (which btw I believe did not help, I might need to recover a backup of the db).
-
-
@fgallese said in 3.3.0 Upgrade Support:
Thank you @baris for all your help and support, our forum is back online thanks to you.
@fgallese thanks for debugging with me, released 3.3.4 that has the fixes for the upgrade script.
If you don't have a lot of chat messages this doesn't effect you. In @fgallese case the upgrade script took ~2.5 hours due to one room having 150 users and 40k messages.
-
The upgrade script asked me to upgrade the plugin @nodebb/nodebb-plugin-reactions, I do it but it doesn't working after upgrade. no reactions icon appears on topic
Need to uninstall the plugin, rebuild, install and activate the plugin again for working