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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Cloudron is offline stuck at reconnecting

    Pixelfed
    3
    11
    573
    Loading More Posts
    • 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.
    • O
      onlybro last edited by onlybro

      Hello

      I made the following changes to mysql conf to further optimize pixelfed cause it was too slow
      and logs on MySQL was stated as dangerously high memory!!!

      Since then cloudron dashboard is reconnecting tried clearing cache on browser it’s the same but the app works fine and fast.

      I’m using 4GB dedicated on linode
      [mysqld]
      performance_schema=ON
      max_connections=200

      innodb_buffer_pool_size=10M
      key_buffer_size=220M
      read_buffer_size=256K
      sort_buffer_size=256K
      join_buffer_size=256K

      tmp_table_size=32M
      max_heap_table_size=32M
      innodb_log_file_size=1M

      https://mathiasbynens.be/notes/mysql-utf8mb4

      character-set-server = utf8mb4
      collation-server = utf8mb4_unicode_ci

      set timezone to UTC

      default_time_zone='+00:00'

      disable bin logs. they are only useful in replication mode

      skip-log-bin
      skip-name-resolve
      [mysqldump]
      quick
      quote-names
      max_allowed_packet = 16M
      default-character-set = utf8mb4

      O 1 Reply Last reply Reply Quote 0
      • O
        onlybro @onlybro last edited by onlybro

        @onlybro

        This is what I was trying to do

        Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1

        Then

        Ok this was resolved after removing

        skip name resolve

        However it was mentioned on google and other forums on search that adding skip name resolve speeds up the website that’s why i was adding it sadly i had to remove it for cloudron to work not only that even pixelfed password reset wasn’t working but now all works fine except the speed

        1 Reply Last reply Reply Quote 0
        • nebulon
          nebulon Staff last edited by

          Cloudron has two mysql databases, one for the system itself and also one inside a docker container for apps. Which one are you referring to? To improve on the app performance you have to tweak the one inside the docker container, however tweaking the configs is not supported and may cause compatibility issues with other apps as well as might break a Cloudron update or at least will not survive an update. So it may be better to first discuss what the goals are here and then we can see what tweaking is feasible and what should go into a Cloudron release itself.

          O 1 Reply Last reply Reply Quote 0
          • O
            onlybro @nebulon last edited by

            @nebulon

            Cloudron has some memory usage error going on it consumes more memory that which is required and that is why i guess i was getting out of memory emails from my cloudron while using a 4GB dedicated

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @onlybro last edited by

              @onlybro Can you maybe paste the error message in the oom mails? They should give an indication of what is running out of memory.

              O 1 Reply Last reply Reply Quote 0
              • O
                onlybro @girish last edited by

                @girish

                I had adjusted the memory from mysql it gives optimal performance however by default the server had set the memory for high usage dangerously.

                nebulon 1 Reply Last reply Reply Quote 0
                • nebulon
                  nebulon Staff @onlybro last edited by

                  @onlybro not sure I can follow what the issue here is. Can you give more information of which mysql instance you are talking about and what you mean by "set the memory for high usage"?

                  O 1 Reply Last reply Reply Quote 0
                  • O
                    onlybro @nebulon last edited by onlybro

                    @nebulon

                    In a fresh Ubuntu server installed cloudron when I ran the following command to check the optimal performance

                    ./mysqltuner.pl

                    It gave me a message saying the memory usage is dangerously high.

                    I then adjusted the join size and buffer size of mysql including maximum packets accordingly to get optimal performance.

                    The command also asked me under general recommendation to do the following to further adjust the performance

                    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1

                    When I did that on mysql conf the cloudron dashboard and inbuilt mail client stopped working so I had to undo it again.

                    I didn’t know how to configure accounts with ip and subnets only but I only added
                    skip-name-resolve=1

                    And it gave me the following error

                    Cloudron is offline. Reconnecting…

                    Cloudron Error
                    ER_HOST_NOT_PRIVILEGED: Host '127.0.0.1' is not allowed to connect to this MySQL server

                    nebulon 1 Reply Last reply Reply Quote 0
                    • nebulon
                      nebulon Staff @onlybro last edited by nebulon

                      @onlybro thanks. I don't know what this mysqltuner.pl script is, however all those various options for mysql exist because mysql has 1000s of different use-cases and thus specific tweaks to be made.
                      Just following a script providing recommendations without fully understanding what they do and for a start how this particular mysql instance is used will not solve anything and usually makes things worse. The ubuntu defaults for mysql usually aim for a good middleground already and they are not chosen randomly. Not specific to mysql, but generally to projects which offer a great variety of optimizations, it often becomes a highly opinionated decision unless we have a solid way to get benchmarks for our use-case.

                      I think to shed some more light here. From that posted ip address, it looks like you are referring to the mysql instance on the host directly. This is essentially just the management database and while important, quite small and is completely unrelated to apps. I don't think even investing time here, unless we see something overly excessive happening, is worth it.

                      O 1 Reply Last reply Reply Quote 0
                      • O
                        onlybro @nebulon last edited by

                        @nebulon

                        What I wanted to inform was after adding
                        skip-name-resolve=1 cloudron stopped working that’s it

                        nebulon 1 Reply Last reply Reply Quote 0
                        • nebulon
                          nebulon Staff @onlybro last edited by

                          @onlybro thanks for the heads up on this. I think I understand the reason for that recommendation. But to understand this in the Cloudron context, once the box process starts up, we create a mysql connection pool. This is never destroyed and as long as the box process is up and running, the name resolving is only done during startup once. So I think we are good as is on this one.

                          I would actually be more curious about the memory settings you mentioned, that is probably more worthwhile understanding.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Powered by NodeBB