Critical severityconnection
Power BI Refresh Error:
1040
What does this error mean?
The MySQL server has reached its maximum connection limit and is refusing new connections.
Common causes
- 1The max_connections MySQL variable is set too low for the workload
- 2Connection pooling is not configured and each application thread opens a new connection
- 3Long-running queries hold connections open, exhausting the pool
- 4ADF parallel copy activities each open separate connections without a shared pool
How to fix it
- 1Step 1: Check current connections: `SHOW STATUS LIKE 'Threads_connected';` and `SHOW VARIABLES LIKE 'max_connections';`
- 2Step 2: Increase the limit: `SET GLOBAL max_connections=500;` (also set in my.cnf for persistence).
- 3Step 3: Identify long-running connections: `SHOW PROCESSLIST;` — kill idle ones with `KILL <process_id>;`
- 4Step 4: Implement or tune connection pooling in the application to reuse connections.
Frequently asked questions
Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html