Retry model on connection errors
See original GitHub issueHey Guys,
Is it possible to implement re-trying of queries if the query fails due to non-model related errors?
For example, sometimes Azure SQL fails with errors like this:
[2021-02-24 05:50:02,777] {dbt_rpc.py:83} INFO - Failed model `base_signups`: Database Error in model base_thrive_leads_signups (models/02_base/base_signups.sql)
('08S01', '[08S01] [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x68 (104) (SQLExecDirectW)')
compiled SQL at target/run/my_project/models/02_base/base_signups.sql
This is particularly frustrating in daily, automated runs through airlfow. I have solved it for now by adding retry logic through airflow that re-runs only failed and skipped models, but perhaps it would be worthwhile solving this at the dbt-sqlserver level for everyone?
Thanks, kim
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Retry a database connection - iNTERFACEWARE Help Center
Sometimes errors can occur when you are connecting to a Database, because network connections to a database are never 100% perfect. And if...
Read more >Azure SQL Database - Working with transient errors
Troubleshoot transient connection errors in SQL Database and SQL Managed Instance ... If the error is transient, retry to open a connection.
Read more >PHP MySQL Connection error - Implementing Retry logic
I would suggest we put number of retries into the call as well with some sleep. I would recommend looking at Transient Fault...
Read more >Try. And then retry. There can be failure. | Neo4j Developer Blog
To sum this up: Stateful connections are costly to acquire and there are many good reasons to keep them around once created. Connection...
Read more >Handle transient database connection errors
TransientRetryer is based on the Microsoft Enterprise Library Transient Fault Handling Application Block and it implements retry logic. The ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The dbt-sqlserver 1.2.0 release includes an option
retries
in the target configuration which should mitigate these kinds of issues. Let me know if that doesn’t work for you so that I can reopen this issue.Hi This is azure sql.
Encountered an error while running operation: Database Error 123 ('28000', "[28000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''. (18456) (SQLDriverConnect)")