-
Notifications
You must be signed in to change notification settings - Fork 126
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
Expose CLIENT_SESSION_KEEP_ALIVE
as a configuration option similarly to other drivers
#847
Comments
hello and thank you for submitting this issue ! also great that you already read upon the keep alive functionality; it is indeed the way to go to refresh the authentication token which by default has a 4-hour lifetime - to refresh it, you need to send keepalives with the driver (or alternatively, any dummy query like the keepalives are enabled and automatically sent every hour when the parameter you can find a full connection string example at the above documentation section, or if you look into the hope this helps - if it doesn't, please send a minimal viable reproduction program which when run, exhibits the behaviour of the driver not sending keepalives. |
Hi, testing now with t := "true"
cfg := &sf.Config{
Account: sfAccount,
User: sfUser,
Database: sfDatabase,
Schema: sfSchema,
Warehouse: sfWarehouse,
Role: sfRole,
Authenticator: sf.AuthTypeJwt,
PrivateKey: rsaPrivateKey,
Params: map[string]*string{"client_session_keep_alive": &t},
} which to be honest looks pretty ugly and is not that obvious when reading the documentation. |
Confirmed working for > 24 hours now. How about having this as a separate config option (I hope you agree the |
okay, that's good to hear the parameter works as intended so now you have a way to keep the long running connection alive. |
CLIENT_SESSION_KEEP_ALIVE
as a configuration option similarly to other drivers
@sfc-gh-anugupta any updates? ETA? |
no timeline estimates as of now, but will share if any new information becomes available |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
v1.6.22
linux amd64
1.20.4
5.Server version:* E.g. 1.90.1
Backend service returns
390114: Authentication token has expired. The user must authenticate again
after some time after being started. The service uses private key authentication with snowflake db and is intended to serve an API to a webapp. So it's long-running.I've read about the heartbeat functionality, but it doesn't seem to prevent this error.
What did you expect to see?
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
What is your Snowflake account identifier, if any? (Optional)
The text was updated successfully, but these errors were encountered: