Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Rocket.Chat
  3. The rocketchat_apps_logs.bson collection is huge, can we reduce or remove it?

The rocketchat_apps_logs.bson collection is huge, can we reduce or remove it?

Scheduled Pinned Locked Moved Rocket.Chat
33 Posts 7 Posters 743 Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #21

      @stoccafisso the issue is not related to Cloudron. It seems rocket.chat is filling up the logs (specifically, it seems apps inside rocket.chat are putting lots of logs). See https://forum.cloudron.io/post/100242 for the setting, it's inside rocket.chat

      1 Reply Last reply
      1
      • girishG girish

        @robw just guessing here, so do this with a backup. In settings -> apps, change the log destination to filesystem. Change it to something like /app/data/app_logs (which cloudron as owner) . By default, it seems to save logs to the mongodb database. Once you verify that something is getting created in the filesystem, maybe you can run some mogodb commands to remove the app_logs collection.

        image.png

        S Offline
        S Offline
        stoccafisso
        wrote on last edited by stoccafisso
        #22

        @girish thanks a lot for helping.

        I have had some frustrating hours, had to reinstall the whole cloudron in a 16GB ram droplet in order to be able to reinstall latest backup of Rocket.Chat, that backup was over 7GB, while only 2GB before the logtrouble startet.

        Anyway, have it installed and working, and in Rocket.Chat made the exact setting you advice above. But in the Rocket.Chat terminal /app/data I can see no "app_logs" file?

        Also when I go into mongodb and issue the commands you suggest, I get the following error message:

        root@1116b395-909e-4f51-bd9e-9ad9bed3846e:/app/data# mongosh -u "${CLOUDRON_MONGODB_USERNAME}" -p "${CLOUDRON_MONGODB_PASSWORD}" ${CLOUDRON_MONGODB_HOST}:${CLOUDRON_MONGODB_PORT}/${CLOUDRON_MONGODB_DATABASE} db.getCollection('rocketchat_apps_logs').countDocuments()
        bash: syntax error near unexpected token `('
        

        I would like to have a look in mongodb, and delete logentries there if there are any. So what to do with these two issues?

        S 1 Reply Last reply
        0
        • S stoccafisso

          @girish thanks a lot for helping.

          I have had some frustrating hours, had to reinstall the whole cloudron in a 16GB ram droplet in order to be able to reinstall latest backup of Rocket.Chat, that backup was over 7GB, while only 2GB before the logtrouble startet.

          Anyway, have it installed and working, and in Rocket.Chat made the exact setting you advice above. But in the Rocket.Chat terminal /app/data I can see no "app_logs" file?

          Also when I go into mongodb and issue the commands you suggest, I get the following error message:

          root@1116b395-909e-4f51-bd9e-9ad9bed3846e:/app/data# mongosh -u "${CLOUDRON_MONGODB_USERNAME}" -p "${CLOUDRON_MONGODB_PASSWORD}" ${CLOUDRON_MONGODB_HOST}:${CLOUDRON_MONGODB_PORT}/${CLOUDRON_MONGODB_DATABASE} db.getCollection('rocketchat_apps_logs').countDocuments()
          bash: syntax error near unexpected token `('
          

          I would like to have a look in mongodb, and delete logentries there if there are any. So what to do with these two issues?

          S Offline
          S Offline
          stoccafisso
          wrote on last edited by
          #23

          Sorry, I forgot to create the directory and make cloudron the owner. Done 😀

          1 Reply Last reply
          0
          • R Offline
            R Offline
            robw
            wrote on last edited by
            #24

            @stoccafisso I can confirm that for me this is Rocket.Chat flakiness, not Cloudron. I fear your restoration process won't help if Rocket.Chat is just going to kick off its log filling process again.

            @girish I haven't yet tried moving logs to the filesystem, because (very strangely) my Rocket.Chat settings page currently appears to be empty, just a search box:

            6a705bac-8cc0-4a93-9388-5336b1f80132-image.png

            That's a Rocket.Chat mystery I haven't figured out yet. 🙂

            I did try the scheduled mongodb log clearing idea directly in the app container, but it didn't seem to help. Because I can't see what's actually happening in the database, I don't know if that's because the data is filling up faster than the query runs, or because of database locking because the database is so big (100s of Gb), or something to do with virtual container file system strangeness, or something else.

            At this stage my server seems to have fallen into this pattern:

            • Rocket.Chat fills the disk
            • Rocket.Chat attempts an update (I have auto updates on)
            • Update fails because the backup fails (no disk space to prepare the backup, even though my backups go offsite to Backblaze)
            • Rocket.Chat restarts, at which point the "filled" disk space moves from within the Rocket.Chat container to the virtual file system (reported as "everything else" on the Cloudron System Info page)
            • A reboot releases the disk space from the virtual file system
            • Start over...

            The disk filling doesn't seem to start immediately any more. I don't know what triggers it.

            So that means with a reboot every day or so, the server is more or less operational for general usage, except for a while right at the end when the disk is full.

            I'm hoping a Rocket.Chat update will arrive soon that makes this go away.

            1 Reply Last reply
            1
            • R Offline
              R Offline
              robw
              wrote on last edited by
              #25

              Quick update: We now have Rocket.Chat on the 2.54.3 package (ran a manual update without a backup), i.e. the small update which sets the Deno cache directory. It has not fixed the problem. Nothing useful from the Rocket.Chat forums yet. So still working on it.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                robw
                wrote on last edited by
                #26

                Quick update: Upgrade to package 2.55.0 with Rocket.Chat server 7.3.0 did not fix the problem (though I didn't think it would based on the RC release notes).

                Attempts to get help on the Rocket.Chat community forum appear to have failed because I encountered the rudest and most self centred and unhelpful "Community Liaison Officer" I've ever had the misfortune to meet, a genuinely toxic individual. However, my glass is half full: the silver lining is that it reinforced my sincere appreciation of the community in this forum and the Cloudron team. 🙂

                1 Reply Last reply
                1
                • J Offline
                  J Offline
                  joseph
                  Staff
                  wrote on last edited by
                  #27

                  @robw a bit late to the thread but what is your current configuration for logs inside rocket.chat ? Are you using filesystem? i.e the screenshot that @girish posted at https://forum.cloudron.io/post/100242

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    robw
                    wrote on last edited by
                    #28

                    Good question @joseph - Unfortunately I can't see the settings in Rocket.Chat right now, my settings screen is blank. (I double checked and I do have admin user access.) So I assume it is whatever is default. A suggestion above is to change the logs storage and see what happens. I will give that a go when I get some time to work out how to alter the invisible settings. 🙂

                    image.png

                    Meanwhile, I have observed that while the disk filling process does not kick off straight away, it always kicks off when the backup process starts. Taking a backup seems to trigger the process with 100% reliability. (In fact this might be why the disk fills up overnight, as I had auto backups enabled.) Then the disk fills and the backup fails. So I have no app level backups for Rocket.Chat at the moment.

                    Regarding the separate problem of blank settings, I found that the Admin group had checkboxes DISABLED for all the settings configurations. I don't know what caused that or whether it's important, we've never touched this screen. I have switched these on but my settings are still blank so far.

                    89d80bf6-114d-4cd0-91f7-8d899e0e9e9d-image.png

                    J 1 Reply Last reply
                    0
                    • R robw

                      Good question @joseph - Unfortunately I can't see the settings in Rocket.Chat right now, my settings screen is blank. (I double checked and I do have admin user access.) So I assume it is whatever is default. A suggestion above is to change the logs storage and see what happens. I will give that a go when I get some time to work out how to alter the invisible settings. 🙂

                      image.png

                      Meanwhile, I have observed that while the disk filling process does not kick off straight away, it always kicks off when the backup process starts. Taking a backup seems to trigger the process with 100% reliability. (In fact this might be why the disk fills up overnight, as I had auto backups enabled.) Then the disk fills and the backup fails. So I have no app level backups for Rocket.Chat at the moment.

                      Regarding the separate problem of blank settings, I found that the Admin group had checkboxes DISABLED for all the settings configurations. I don't know what caused that or whether it's important, we've never touched this screen. I have switched these on but my settings are still blank so far.

                      89d80bf6-114d-4cd0-91f7-8d899e0e9e9d-image.png

                      J Offline
                      J Offline
                      joseph
                      Staff
                      wrote on last edited by
                      #29

                      @robw a "hack" is to maybe install a fresh instance and then compare what is different 🙂 Will give a better idea of what you are supposed to see normally vs what you are seeing in your instance...

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        robw
                        wrote on last edited by
                        #30

                        Thanks @joseph - I will try that!

                        Meanwhile, a small update: The disk filling process appears to have magically stopped. I don't know when. So our Rocket.Chat appears to be back to normal operation. I don't see any obvious clues in the package updates, although there are updates to the apps engine, maybe it was that. Our instance is backing up and updating happily again.

                        It wasn't me! 🙂

                        1 Reply Last reply
                        2
                        • G Offline
                          G Offline
                          gilburner27
                          wrote on last edited by
                          #31

                          Hi, I have a similar experience but also unable to remove it

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kawaiipunk
                            wrote last edited by
                            #32

                            Hi, I'm having a similar problem.

                            Our .bson file is 135GB and immediately fills back up again after being pruned. I haven't yet found any reports of this in the upstream RC issue tracker. Possibly we can we assume this is a Cloudron specific issue?

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              kawaiipunk
                              wrote last edited by
                              #33

                              Just crossposting this from the official RC forum: https://forums.rocket.chat/t/rocketchat-apps-logs-collection-is-massive/8608/16

                              Seems at least one user there is a Cloudron user.

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search