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

Snowflake connection timeout #654

Closed
cmcarthur opened this issue Feb 10, 2018 · 4 comments
Closed

Snowflake connection timeout #654

cmcarthur opened this issue Feb 10, 2018 · 4 comments
Labels
bug Something isn't working snowflake

Comments

@cmcarthur
Copy link
Member

In a 6+ hour run against a Snowflake cluster, the run ends with:

252007 (08001): Authentication token has expired. The user must authenticate again.

I suspect that the master connection is timing out during the 6 hour run, and we aren't refreshing it like we do with model connections.

@cmcarthur
Copy link
Member Author

According to this support post, an idle auth token is revoked after 4 hours. So any dbt run that takes more than 4 hours will fail post run hooks.

https://support.snowflake.net/s/question/0D50Z00006uSiDlSAK/authentication-token-expired-issue

@cmcarthur cmcarthur added bug Something isn't working snowflake labels Feb 10, 2018
@drewbanin drewbanin added this to the Adapter Parity milestone Mar 6, 2018
@drewbanin
Copy link
Contributor

4 hour models are an anti-pattern. closing

@nsnyder3
Copy link

nsnyder3 commented Aug 3, 2018

@drewbanin Could you say more about what you see an an anti-pattern? An entire dbt run that takes longer than 4 hours is an anti-pattern? We don't have any single models that take longer than 4 hours, but our entire run together can take that long, especially when we are doing a full refresh from a source table with ~70 billion records.

I'd love to understand:

  1. when you expect the session to time out
  2. how we can design our models to run in less than 4 hours when we are processing ~70 billion records.

@drewbanin
Copy link
Contributor

hey @nsnyder3 - great questions. We resolved a couple of different issues in dbt that could contribute to this timeout error around the time we closed this issue. You can check those other discussions here: #657, #693, #764

I think that the issues linked above should ameliorate many of these Snowflake timeout problems in the wild, but if you're still having issues, I'd be really grateful if you could create an issue with some more information about your particular scenario.

I'll also note we've recently created a new issue to optionally disable timeouts altogether on Snowflake. You can check that out here #827. I'd love to know if you think this will be a suitable fix for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working snowflake
Projects
None yet
Development

No branches or pull requests

3 participants