Skip to content
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

Postgres/Redshift adapters mask SSL syscall error with "connection already closed" #997

Closed
cmcarthur opened this issue Sep 12, 2018 · 1 comment
Assignees
Milestone

Comments

@cmcarthur
Copy link
Member

cmcarthur commented Sep 12, 2018

Issue

Issue description

A recent Sinter run of dbt archive encountered the dreaded:

SSL SYSCALL error: EOF detected

Relevant part of the call stack:

  File "/usr/local/lib/python3.5/dist-packages/dbt/runner.py", line 89, in call_runner
    result = runner.safe_run(manifest)
  File "/usr/local/lib/python3.5/dist-packages/dbt/node_runners.py", line 121, in safe_run
    self.adapter.release_connection(self.profile, node_name)
  File "/usr/local/lib/python3.5/dist-packages/dbt/adapters/default/impl.py", line 494, in release_connection
    cls.rollback(to_release)
  File "/usr/local/lib/python3.5/dist-packages/dbt/adapters/default/impl.py", line 613, in rollback
    connection.get('handle').rollback()

When it tries to rollback the transaction on that connection handle, postgres raises another exception which masks the original one and prints out connection already closed.

There was an earlier Failed to release connection! error -- I don't know if the two are related.

System information

dbt version: 0.11.0
platform: Sinter
python version: 3.5

Steps to reproduce

Difficult to repro since it depends on Postgres server failing in a specific way. However I imagine manually killing a postgres connection handle in the middle of an archive job would create similar behavior.

@beckjake beckjake self-assigned this Sep 13, 2018
@drewbanin drewbanin added this to the Guion Bluford milestone Sep 18, 2018
beckjake added a commit that referenced this issue Sep 18, 2018
…ng-errors

Fix exception handling masking on cleanup (#997)
@beckjake
Copy link
Contributor

Fixed (hopefully) in #1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants