• Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      PMM-1753 shows as being released in 1.8.0, introducing a change to how MySQL connections are kept open by the mysqld_exporter.

      I couldn't find this in the release notes (I tried searching for issue number, "connection" and "scrape"), nor is it made clear on the Managing PMM Client resource.

      Since it is best practice to restrict connections for monitoring accounts, this could be causing problems for people. The "recommended" limit from the upstream exporter has always stated 3 connections, which until recently has been working fine for me even with mysql:queries running along side it.

      After I upgraded to 1.8.0 I saw an issue with metrics and found:

      Cannot connect to MySQL pmm:***@unix(/var/run/mysqld/mysqld.sock): Error 1226: User 'pmm' has exceeded the 'max_user_connections'

      This occurs for the QAN agent as the mysqld_exporter is holding connections open, which can be seen by monitoring performance_schema.user.

      For reference, so far MAX_USER_CONNECTIONS=4 for an account shared between the 2 seems to be fine, although perhaps stating 5 in the documentation would be better.

      That said, it appears to be a default of 10 is used if pmm-admin creates the account for you

        Smart Checklist


            Issue Links



                • Assignee:
                  roma.novikov Roma Novikov
                  ceri.williams Ceri Williams
                • Votes:
                  0 Vote for this issue
                  3 Start watching this issue


                  • Created: