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. Support
  3. Able to clean up binlog.###### files in /var/lib/mysql directory?

Able to clean up binlog.###### files in /var/lib/mysql directory?

Scheduled Pinned Locked Moved Solved Support
mysql
32 Posts 5 Posters 9.0k Views 6 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.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by
    #23

    I guess setting it to something more reasonable for us like a couple of days should be plenty

    d19dotcaD 1 Reply Last reply
    1
    • nebulonN nebulon

      I guess setting it to something more reasonable for us like a couple of days should be plenty

      d19dotcaD Offline
      d19dotcaD Offline
      d19dotca
      wrote on last edited by
      #24

      @nebulon said in Able to clean up binlog.###### files in /var/lib/mysql directory?:

      I guess setting it to something more reasonable for us like a couple of days should be plenty

      Exactly, yes. I think it should basically be the minimal number possible / reasonable, especially when a well-used Cloudron like mine seems to generate 1-2 GB of them in just a 24 hour period. If we kept that as 10 days that'd be anywheres from 10 GB to 20 GB which is far too much disk space consumed for that, IMO. I thinking keeping them for just two days would be sufficient, heck even maybe just one day.

      --
      Dustin Dauncey
      www.d19.ca

      1 Reply Last reply
      1
      • d19dotcaD d19dotca

        Thinking out loud here but a couple things I'm wondering about (and will try to test what I can):

        1. Is this issue unique to only my instance, or happening to instances of Cloudron?
        2. If happening to other instances, is the commonality being on Ubuntu 20.04 or MySQL 8.x?
        3. If others have this issue, then I'd suspect we need to enable something during Cloudron setup to handle this out of the box, or ideally just disable bin logs (if possible).
        P Offline
        P Offline
        p44
        translator
        wrote on last edited by
        #25

        @d19dotca Probably I had the same problem, yesterday one instance alerted that disk was full. I didn't have time yet to check inside.

        d19dotcaD 1 Reply Last reply
        0
        • P p44

          @d19dotca Probably I had the same problem, yesterday one instance alerted that disk was full. I didn't have time yet to check inside.

          d19dotcaD Offline
          d19dotcaD Offline
          d19dotca
          wrote on last edited by d19dotca
          #26

          @p44 Yeah probably. I'm honestly very surprised how many people seemingly haven't run into this issue yet. I guess most using Cloudron are still on Ubuntu 18.04 rather than 20.04, or those on 20.04 have plenty of disk space where it's not a concern at all (unfortunately I don't have that luxury, haha) or they just don't use their Cloudrons nearly as much as some of us do which means they have far less writes to the database thus less binlog entries. Guess it's a "fringe" scenario for now haha but definitely still a valid one that we need to fix. I think the changes coming from Girish & Nebulon will have a great impact on that and prevent issues like I and you were running into where the disk usage goes insane from binlog files. Keeping the binlogs to just 1 or 2 days should be plenty for actively used Cloudron servers.

          --
          Dustin Dauncey
          www.d19.ca

          girishG P 2 Replies Last reply
          1
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by girish
            #27

            All our managed instances (our old business) are on Ubuntu 20 and they don't seem to accumulate as much data. It's around 100MB everyday and so it's < 1GB for 10 days. I guess the deal is we have the luxury of extra space. What I noticed is that it seems if you start afresh on Ubuntu 20 the behavior appears different from if you migrate from Ubuntu 18. I haven't really tinkered with the combinations of upgrades.

            In any case, binlog is at 2 days for both the mysql addon and the main mysql server now.

            1 Reply Last reply
            1
            • d19dotcaD d19dotca

              @p44 Yeah probably. I'm honestly very surprised how many people seemingly haven't run into this issue yet. I guess most using Cloudron are still on Ubuntu 18.04 rather than 20.04, or those on 20.04 have plenty of disk space where it's not a concern at all (unfortunately I don't have that luxury, haha) or they just don't use their Cloudrons nearly as much as some of us do which means they have far less writes to the database thus less binlog entries. Guess it's a "fringe" scenario for now haha but definitely still a valid one that we need to fix. I think the changes coming from Girish & Nebulon will have a great impact on that and prevent issues like I and you were running into where the disk usage goes insane from binlog files. Keeping the binlogs to just 1 or 2 days should be plenty for actively used Cloudron servers.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by girish
              #28

              @d19dotca So reading a bit more, I think you might be right that it's of minimal use when not replicating and for replaying commands in that mode... So, I will disable it altogether. It got turned on in MySQL 8 by default but was off in MySQL 5.7.

              d19dotcaD 1 Reply Last reply
              2
              • girishG girish

                @d19dotca So reading a bit more, I think you might be right that it's of minimal use when not replicating and for replaying commands in that mode... So, I will disable it altogether. It got turned on in MySQL 8 by default but was off in MySQL 5.7.

                d19dotcaD Offline
                d19dotcaD Offline
                d19dotca
                wrote on last edited by d19dotca
                #29

                @girish Music to my ears. haha. Thanks Girish! 🙂

                --
                Dustin Dauncey
                www.d19.ca

                1 Reply Last reply
                0
                • d19dotcaD d19dotca

                  @p44 Yeah probably. I'm honestly very surprised how many people seemingly haven't run into this issue yet. I guess most using Cloudron are still on Ubuntu 18.04 rather than 20.04, or those on 20.04 have plenty of disk space where it's not a concern at all (unfortunately I don't have that luxury, haha) or they just don't use their Cloudrons nearly as much as some of us do which means they have far less writes to the database thus less binlog entries. Guess it's a "fringe" scenario for now haha but definitely still a valid one that we need to fix. I think the changes coming from Girish & Nebulon will have a great impact on that and prevent issues like I and you were running into where the disk usage goes insane from binlog files. Keeping the binlogs to just 1 or 2 days should be plenty for actively used Cloudron servers.

                  P Offline
                  P Offline
                  p44
                  translator
                  wrote on last edited by
                  #30

                  @d19dotca totally agree on this point of view.

                  I tryed to run:

                  mysql -uroot -ppassword
                  PURGE BINARY LOGS BEFORE '2021-02-21 23:00:00';
                  

                  and I saved around 2,5 GB...

                  I think Cloudron have two missing two things:

                  1. Control of logs amounts and cleaning function;
                  2. Control of logs to understand potentially threat and give ability to eg. block IP or block login attempts.
                  d19dotcaD 1 Reply Last reply
                  1
                  • P p44

                    @d19dotca totally agree on this point of view.

                    I tryed to run:

                    mysql -uroot -ppassword
                    PURGE BINARY LOGS BEFORE '2021-02-21 23:00:00';
                    

                    and I saved around 2,5 GB...

                    I think Cloudron have two missing two things:

                    1. Control of logs amounts and cleaning function;
                    2. Control of logs to understand potentially threat and give ability to eg. block IP or block login attempts.
                    d19dotcaD Offline
                    d19dotcaD Offline
                    d19dotca
                    wrote on last edited by
                    #31

                    @p44 Agreed. It was definitely a bug. It's all fixed now though for 6.2 when it comes out. 🙂 https://git.cloudron.io/cloudron/box/-/blob/master/setup/start/mysql.cnf#L19

                    --
                    Dustin Dauncey
                    www.d19.ca

                    P 1 Reply Last reply
                    2
                    • d19dotcaD d19dotca

                      @p44 Agreed. It was definitely a bug. It's all fixed now though for 6.2 when it comes out. 🙂 https://git.cloudron.io/cloudron/box/-/blob/master/setup/start/mysql.cnf#L19

                      P Offline
                      P Offline
                      p44
                      translator
                      wrote on last edited by
                      #32

                      @d19dotca Ok, thank's to your attention! 🙂

                      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