-
Notifications
You must be signed in to change notification settings - Fork 140
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
Question on how CLIENT_SESSION_KEEP_ALIVE works #590
Comments
@davidhcar CLIENT_SESSION_KEEP_ALIVE causes a background thread to call a /heartbeat endpoint to keep the session alive on the server. Without that call the sessions can timeout, as by default they have a 4 hour inactivity timeout on the server. This is not about HTTP connections, but the session state maintained on the Snowflake server side. The .NET connector nuget has a connection pool that expires the connections after 1 hour of not being used, therefore the four hour session timeout on the server should not be reached in normal circumstances (however, also see #606 which can increase the connection pool timeout to two hours when the clocks go back). A pooled connection is either used, and the session expiry timer at the server is reset; or it is not used and is removed from the pool after 1 hour. |
hi and thank you for raising this question! also apologies for the long period without answer from Snowflake. i see now that colgreen-payroc already kindly answered it, so marking this one as closed. if there's any further concerns, please don't hesitate to comment. |
Does setting CLIENT_SESSION_KEEP_ALIVE to true keep compute resources active and cost money? |
as this question seems to be posted randomly in multiple Snowflake driver repositories, and i happened to bump into it on snowflakedb/gosnowflake#1065 first, it was answered first. It is highly encouraged to use the community forum instead for such discussion, instead of driver repositories. |
Thank you for the response. Also, my apologies for posting the question here and in other repos instead of community forums as I was not quite sure where to ask. Thanks for sharing the links for future reference. |
Issue description
When CLIENT_SESSION_KEEP_ALIVE = true, the connection session kept open until the execution of the query for long running queries, that will run more than 4 hours. Once the query executed and returns result back to .Net process, we close the connection, and that session gets terminated, Is that correct understanding about this flag CLIENT_SESSION_KEEP_ALIVE ?
The text was updated successfully, but these errors were encountered: