-
Notifications
You must be signed in to change notification settings - Fork 133
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
SNOW-1198472: Connection Pool . For the same connection the session id keeps to be the same #789
Comments
hi and thank you for raising this issue. Snowflake Sessions themselves are by default kept open indefinitely, or until the authentication token expires. when they are no longer needed, the connection associated with them must be closed. can you please provide a code snippet / small repro program on how you close the connection which is then again re-acquireable from the pool somehow, and is still associated with the same Snowflake Session? Thank you in advance ! |
Hi, we get the connection by doing this
we use the connection to perform the query and then we release it to the pool by doing this with global.snowflakePool.getPool() we just retrieve the global variable that contains the pool |
thank you for the snippet ! this looks like the expected behaviour. since the connection is still open and established and ready to receive queries over it (the main reason for using Connection Pool in the first place; to avoid the overhead needed to repeatedly re-establish the Connection), I think it's expected that the Snowflake Session is still alive which session is associated with the connection which was never closed. as the documentation linked above
if a Connection wasn't closed, we don't expect you might want to consider calling snowflakePool.destroy instead or calling the Snowflake-specific Connection.destroy as mentioned above. is this something which could work for you ? |
yes I think so, TY |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using?
1.8.0
What operating system and processor architecture are you using?
Mac M1 Pro
What version of NodeJS are you using?
(
node --version
andnpm --version
)v12.22.12
What are the component versions in the environment (
npm list
)?...
5.Server version:* E.g. 1.90.1
You may get the server version by running a query:
8.8.4
What did you do?
Creating a connection pool, when I acquire and release a connection.
For the same connection id this keeps the same session id.
What did you expect to see?
After Acquiring the session id it must be different from before
Can you set logging to DEBUG and collect the logs?
yes
The text was updated successfully, but these errors were encountered: