-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbt should refresh connections before they are re-used #782
Comments
@drewbanin I believe this is the same issue I'm experiencing that we recently discussed on Slack. It seems like anytime my dbt run takes longer than 20 minutes, the job hangs and ultimately fails with the "connection timed out" error. I can provide |
Thanks @ryanmcdonnell - we're going to have to do something about this. I think some of the changes we made in 0.10.1 helped, but looks like there are definitely still some issues. This is in our queue for our next release. In your |
Output of
Here's the last bit of
|
TODO : Check if there's a way to add a tcp keepalive to the psycopg2 conn. Additionally, dbt should never use a |
@drewbanin Per your suggestions on Slack, I checked the RedShift docs that pertain to TCP keepalives and confirmed that the Azure machine was already configured well past the limits suggested. I also set Docker to bypass it's networking by binding directly to the |
Thanks for the update @ryanmcdonnell. Glad to hear you got it working, but upset that "use EC2" was the only viable solution. This is in the milestone for our next release, so we're definitely going to see if there's anything we can do to fix this from within dbt |
have fixed similar issues in the past with os level settings:
where a middleman (NAT) was disconnecting me. could be this ^^ if so, figure out if there is a way to set a tcp keepalive on psycopg2? |
spend 4 hours and figure out what we should do here |
It appears that we could insert keepalive values into the connection string, based on the libpq documentation. Those map to keyword arguments passed to
Deciding what values to set is probably the hard part. |
....or, it should not use connections more than once?
In practice, these connections can somehow become closed, resulting in:
I think avoiding the use of the
master
connection can help here. Or, is there some way to re-open the connection if we find that it is closed?The text was updated successfully, but these errors were encountered: