High severitydata source
Power BI Refresh Error:
SqlConnectionIsClosed
What does this error mean?
The SQL connection was unexpectedly closed during an ADF copy activity — before the copy completed. Common causes: transient network drops between the integration runtime and SQL Server, a SQL Server restart or failover during the copy, or an idle connection timeout killing a long-running bulk insert.
Common causes
- 1A transient network disruption between the integration runtime and the SQL server
- 2The SQL server was restarted or failed over during the copy operation
- 3The connection idle timeout on the SQL server or firewall closed the connection during a long-running batch
- 4The self-hosted integration runtime machine ran out of network socket resources
How to fix it
- 1Add a retry policy to the copy activity (Settings > Retry: 3 retries, 60-second retry interval) — most transient connection drops resolve on retry.
- 2Check the SQL Server error log (ERRORLOG file or SQL Server Management Studio > Management > SQL Server Logs) for any restarts, failovers, or 'connection killed' events during the failure window.
- 3Increase the SQL Server 'remote query timeout' and 'connection timeout' settings if the copy activity runs for more than 30 minutes.
- 4Reduce the copy activity batch size (writeBatchSize) to shorten the duration of each individual write operation, reducing the window for idle connection timeouts.
- 5If using a self-hosted IR, verify the network path between the IR host and the SQL Server is stable — run a sustained ping during the copy window to detect packet loss.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/connector-troubleshoot-synapse-sql