metricsign
Start free
High severityconnection

Power BI Refresh Error:
2006

What does this error mean?

The MySQL connection was dropped mid-session — typically due to a timeout, large packet, or server restart.

Common causes

  • 1The query or transaction exceeded the wait_timeout or interactive_timeout MySQL server variable
  • 2A packet larger than max_allowed_packet was sent
  • 3The MySQL server was restarted while the connection was active
  • 4Network interruption between the client and server during a long-running query

How to fix it

  1. 1Step 1: Increase timeout values: `SET GLOBAL wait_timeout=28800; SET GLOBAL interactive_timeout=28800;`
  2. 2Step 2: Increase max packet size if sending large data: `SET GLOBAL max_allowed_packet=134217728;`
  3. 3Step 3: Implement connection retry logic in the application or use connection pooling with reconnect enabled.
  4. 4Step 4: Check MySQL error log for server-side restarts that caused the dropped connection.

Frequently asked questions

What is the default MySQL wait_timeout?

The default is 28800 seconds (8 hours) for non-interactive connections, but many managed MySQL services set it much lower — Azure Database for MySQL defaults to 120 seconds.

Why does this error appear only on large queries?

Large queries take longer to execute. If the connection idles between statement executions longer than wait_timeout, MySQL closes it. Packets exceeding max_allowed_packet also trigger immediate disconnection.

Can MetricSign detect when this error causes a pipeline failure?

Yes — MetricSign captures ADF pipeline failures and surfaces the MySQL error code in the incident detail view.

Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html

Other connection errors