Is there any way to limit the pmm connections to a database instance?

currently, I found in some cases (e.g. the database instance is stuck, so all query responses will be affected), the PMM agent uses too many connections, e.g.

+----------+----------------+---------------------+
| count(*) | user           | ts                  |
+----------+----------------+---------------------+
|      306 | pmm            | 2022-10-20 10:06:59 |
|      306 | pmm            | 2022-10-20 10:07:07 |
|      306 | pmm            | 2022-10-20 10:07:15 |
|      306 | pmm            | 2022-10-20 10:07:23 |

the PMM agent issues more than 300 connections to the host it monitors, How to limit the number of connections PMM uses in case the PMM query response is delayed? It’s indeed a problem, this will make the server status even worse.

1 Like

Hello @Luke03011,
If you follow our documentation you’ll see that the pmm user has a maximum of 10 connections. You should be able to alter the existing user you have created and limit the number of connections similar to as shown in our docs.

1 Like

Thanks for your quick response @matthewb

1 Like