-
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
Server closed the connection unexpectedly for Postgres12 #2352
Comments
hey @MondeSinxi - thanks for opening this issue. It sounds like the connection to Postgres is being terminated after some relatively-long timeout. I don't think I've seen reports of this happening before on Postgres! I do see that dbt is still using the
Do you happen to know if you have any Postgres settings |
Hi @drewbanin, sorry for waiting so long before replying. I've just checked my Regarding your suggestions above how would I open a new connection for executing the Would this be a model that would call the macros I want to run at the end? |
I'm having the same problem, any update on this? |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
having the same issue. I've set |
This is a chronic problem for me. From one identical dbt run to the next it can run flawlessly, or fail, sometimes quickly, and sometimes only after hanging for ages midway with Doubly irritating is that a failure still qualifies as success when running out of a shell script (within a container), and so far I haven't been able implement a re-run or abort of the sequence as a work-around. I've tried all manner of profile settings following every variation I could find on stack overflow etc. I'm guessing between myself and countless others, we would have hit on the magic configuration by now if connect_timeout, keep_alives_idle etc were the solution. |
Same problem here, happens a lot, mostly when we are doing full builds of incremental views or something that takes longer. After like 300s it fails pretty much always. |
Describe the bug
When running long dbt runs (20 minutes or so) I get an error message that the server has closed the connection unexpectedly after building the last model. The on-run-end hooks also don't run after the last model is built. I'm using dbt to build tables/views for Postgresql 12.
All tables/views are created in the database and there are no errors reported for any of the models run.
This seems to have been fixed for Snowflake and Redshift in #657
Steps To Reproduce
A simple
dbt run
with the following at the on-run-end in thedbt_project.yml
file.Expected behavior
I expect dbt to run and log results at the end of the run
Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
I'm running dbt in a Docker version 19.03.8
The text was updated successfully, but these errors were encountered: