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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. mysql -> "too many connections"

mysql -> "too many connections"

Scheduled Pinned Locked Moved Unsolved Support
mysql
7 Posts 2 Posters 106 Views 2 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.
  • philkunzP Offline
    philkunzP Offline
    philkunz
    wrote last edited by joseph
    #1

    Got some fairly popular projects on cloudron. With stuff getting more popular, I run more and more into problems where databases lock up because of "too many connections" Whats happening there?

    1 Reply Last reply
    1
    • jamesJ Online
      jamesJ Online
      james
      Staff
      wrote last edited by
      #2

      Hello @philkunz
      Can you please share the logs of the database that logs this?

      1 Reply Last reply
      1
      • philkunzP Offline
        philkunzP Offline
        philkunz
        wrote last edited by
        #3
        May 30 20:34:50 2026-05-30T18:34:50Z
        May 30 20:34:50 Error Code:
        May 30 20:34:50 Error Code:
        May 30 20:34:50
        May 30 20:34:50
        May 30 20:34:50 Host '[REDACTED_IPV6]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
        May 30 20:34:50 Host '[REDACTED_IPV6]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
        May 30 20:34:50
        May 30 20:34:50
        May 30 20:34:50 ----------------------------------------
        May 30 20:34:50 ----------------------------------------
        May 30 20:34:50 ER_HOST_IS_BLOCKED
        May 30 20:34:50 ER_HOST_IS_BLOCKED
        May 30 20:34:50 Error: Host '[REDACTED_IPV6]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
        May 30 20:34:50 Error: Host '[REDACTED_IPV6]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
        May 30 20:34:50
        
        1 Reply Last reply
        0
        • jamesJ Online
          jamesJ Online
          james
          Staff
          wrote last edited by
          #4

          Hello @philkunz
          The issue is not actually to too many connections, the issue is that [REDACTED_IPV6] is getting blocked because it creating to many connection erros.
          You have to figure out why this IPv6 is creating these connections errors.

          1 Reply Last reply
          0
          • philkunzP Offline
            philkunzP Offline
            philkunz
            wrote last edited by
            #5

            @james The host is the app though, or?

            1 Reply Last reply
            0
            • philkunzP Offline
              philkunzP Offline
              philkunz
              wrote last edited by
              #6

              its essentially just a sign of an app serving many requests, and thereby hammering the db? Or not?

              1 Reply Last reply
              0
              • jamesJ Online
                jamesJ Online
                james
                Staff
                wrote last edited by james
                #7

                Hello @philkunz
                I can't tell what is accessing your MySQL Service, but if you use Cloudron in the default and not something out of the ordinary, it should be some app.

                To get details about the hosts and connection errors, ssh into your Cloudron server, then run:

                docker exec -it mysql bash -c 'mysql --user=root --password=$CLOUDRON_MYSQL_ROOT_PASSWORD --execute="SELECT * FROM performance_schema.host_cache"'
                

                This will show all.

                If you want to filter for the connection error specifically, run:

                docker exec -it mysql bash -c 'mysql --user=root --password=$CLOUDRON_MYSQL_ROOT_PASSWORD --execute="SELECT HOST, SUM_CONNECT_ERRORS FROM performance_schema.host_cache WHERE SUM_CONNECT_ERRORS > 0;"'
                

                it will create an output like:

                mysql: [Warning] Using a password on the command line interface can be insecure.
                +-----------------+--------------------+
                | HOST            | SUM_CONNECT_ERRORS |
                +-----------------+--------------------+
                | my-cloudron-dev |                  1 |
                +-----------------+--------------------+
                

                You can also filter for the amount of auth errors with something like this:

                docker exec mysql bash -c 'mysql --user=root --password=$CLOUDRON_MYSQL_ROOT_PASSWORD --execute="SELECT HOST, IP, SUM_CONNECT_ERRORS, COUNT_AUTHENTICATION_ERRORS FROM performance_schema.host_cache \G;"'
                

                Which will return something like this:

                *************************** 1. row ***************************
                                       HOST: my-cloudron-dev
                                         IP: fd00:c107:d509::1
                         SUM_CONNECT_ERRORS: 0
                COUNT_AUTHENTICATION_ERRORS: 40
                *************************** 2. row ***************************
                                       HOST: mysql
                                         IP: fd00:c107:d509::5
                         SUM_CONNECT_ERRORS: 0
                COUNT_AUTHENTICATION_ERRORS: 17
                *************************** 3. row ***************************
                                       HOST: mysql
                                         IP: 172.18.30.1
                         SUM_CONNECT_ERRORS: 0
                COUNT_AUTHENTICATION_ERRORS: 1
                *************************** 4. row ***************************
                                       HOST: my-cloudron-dev
                                         IP: 172.18.0.1
                         SUM_CONNECT_ERRORS: 1
                COUNT_AUTHENTICATION_ERRORS: 2
                

                There you can see I intentionally failed to connect many times from inside a Cloudron app by running:

                for i in {1..20}; do mysql --user=${CLOUDRON_MYSQL_USERNAME} --password=WRONGPASSWORD --host=${CLOUDRON_MYSQL_HOST} ${CLOUDRON_MYSQL_DATABASE}; done
                

                When running this again from inside a Cloudron app, I can run the above MySQL query again and can see:

                *************************** 1. row ***************************
                                       HOST: my-cloudron-dev
                                         IP: fd00:c107:d509::1
                         SUM_CONNECT_ERRORS: 0
                COUNT_AUTHENTICATION_ERRORS: 60
                

                Is now 60 and was before 40.

                If this value keeps rising, without you doing anything manually.
                There is some app that is failing to connect to the MySQL service for some reason.
                My first suspect would be some WordPress developer app or a restored app that has old credentials from before the restore.

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                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