Too many connections error

I spun up a pmm 1.0.6 server. After enabling qan on about 60 servers I get errors like:

2016/12/08 19:20:13 server.go:2317: http: response.WriteHeader on hijacked connection
2016/12/08 19:20:13 server.go:2317: http: response.Write on hijacked connection
2016/12/08 19:20:13.252 127.0.0.1 500 705.712µs WS /agents/f47e5df7c29446a04ea13530da9a21d2/data
ERROR 2016/12/08 19:20:14 init.go:229: auth agent: auth.MySQLHandler.GetAgentId: dbm.Open: Error 1040: Too many connections

Is this a parameter I can change?

Any ideas about how many mysql instances I could support with a single pmm server if I only run qan?

Thanks!

In theory, it is only limited by the amount of resources available for container or underlying host.

Looks like there is an issue with MySQL in the container “Error 1040: Too many connections”
If you enter container how many connections do you see?

docker exec -it pmm-server mysql -vv -e ‘show processlist’

152 rows of:

| 11521 | qan-api | localhost:33840 | pmm | Sleep | 2752 | | NULL |
| 11550 | qan-api | localhost:33953 | pmm | Sleep | 2744 | | NULL |
| 11551 | qan-api | localhost:33956 | pmm | Sleep | 40 | | NULL |
| 11567 | qan-api | localhost:34054 | pmm | Sleep | 2732 | | NULL |
| 11568 | qan-api | localhost:34056 | pmm | Sleep | 14 | | NULL |
| 11805 | qan-api | localhost:35108 | pmm | Sleep | 2645 | | NULL |
| 11806 | qan-api | localhost:35110 | pmm | Sleep | 2645 | | NULL |
| 11820 | qan-api | localhost:35179 | pmm | Sleep | 2642 | | NULL |

Seems like I can handle around 25 mysql servers

We have found 1 potential place in the code where it may not close connections. In the next release next week.