juzser / Rocket.Chat-reminder

Advanced Rocket.Chat reminder, easy to use, a lot of features
MIT License
8 stars 7 forks source link

Debugs logs have filled 3 core+ data on db #4

Closed alokraj68 closed 1 year ago

alokraj68 commented 1 year ago

Hi, Seems like debug logs are active in production plugin.

my db is full and rocket chat is down due to this.

example log:

{ "_id" : "niDFoscZSj9ciaNfA", "appId" : "f3ff06c9-fa92-44eb-be38-61cafb7b7566", "method" : "onSettingUpdated", "entries" : [ { "caller" : "anonymous OR constructor", "severity" : "debug", "timestamp" : ISODate("2023-04-24T22:43:25.940Z"), "args" : [ "onSettingUpdated is being called..." ] }, { "caller" : "anonymous OR constructor", "severity" : "debug", "timestamp" : ISODate("2023-04-24T22:43:25.940Z"), "args" : [ "'onSettingUpdated' was successfully called! The result is:", null ] } ], "startTime" : ISODate("2023-04-24T22:43:25.940Z"), "endTime" : ISODate("2023-04-24T22:43:25.940Z"), "totalTime" : 0, "_createdAt" : ISODate("2023-04-24T22:43:25.940Z"), "instanceId" : "975f8ae6-138b-410e-ada7-e27fdac361c2", "_updatedAt" : ISODate("2023-04-24T22:43:25.940Z") }

Removing the plugin for now

alokraj68 commented 1 year ago

if anyone get to this issue follow this steps:

  1. stop rocket chat.

  2. connect to db sudo rocketchat-server.mongo

  3. run use parties

  4. run db.getMongo().getDBNames().forEach(function (v, i) { db.getSiblingDB(v).getCollectionNames().forEach(function (vv, ii) { print(v + ',' + vv + ',' + db.getSiblingDB(v).getCollection(vv).count()) }) }); This will show all collections with size.

  5. verify if db.rocketchat_apps_logs has so many data

  6. if yes, run db.rocketchat_apps_logs.remove({});

  7. this removal takes hours as per your data and system spec.

  8. Once done compact the db

Once done, turn on rocket chat, goto market place installed and remove the plugin.

juzser commented 1 year ago

Which RC version are you using? There is not debug log in the production version.

Maybe you're using version 6.0.0 and when you update the settings, RC will be crashed. That's the issue I met on 6.0.0.

Check this: https://github.com/RocketChat/Rocket.Chat/issues/28761

By the way, if you still get this issue, you can go to Settings > Logs > change the Log Level settings to level 0. Maybe it helps.

alokraj68 commented 1 year ago

Rc was 6 when i installed this plugin. also am unable to create the notification in 6. so i guess its crashing only.

juzser commented 1 year ago

You can try to update RC version. I've updated and see they fixed that.

juzser commented 1 year ago

Close due to RC issue, not the app's issue.