-
Notifications
You must be signed in to change notification settings - Fork 144
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-1914311: Getting "Could not obtain a connection from the pool within a given timeout" once upgraded to 4.3.0 #1094
Comments
I'm getting the same error on Windows 10 and .NET Framework 4.8 after upgrading to 4.3.0 from 2.2.0. The driver works fine while I execute queries consecutively but fails when I try to open two parallel connections. After the first error, all subsequent attempts to open a connection result in the same error. |
hi, thanks for submitting this issue. the pooling has been significantly reworked in the new versions at v4 and above, and there's a couple of parameters now which you can consider to use, to fine-tune the behaviour. Please take a look at https://github.com/snowflakedb/snowflake-connector-net/blob/master/doc/ConnectionPooling.md. What one can experiment with is perhaps specifying a bigger If there is a suspicion that connections are not properly closed so the busy sessions counter is too high, then the pool can be reset by Furthermore, Please also note that now the connection string (options, and the order of options) now uniquely identifies the pool, and it's possible to create multiple pools for e.g. multiple use-cases within the application (e.g. one needs 5 connections and the other 15, it's absolutely possible to configure 2 different pools for the both of them) Hope this helps in tackling this issue - everything is configurable now, so hopefully with some testing, the optimal configuration can be found in each of your use-cases. |
Hi @sfc-gh-dszmolka, thanks for looking into this. I was wrong about two parallel connections. I was actually hitting the
Should I file a separate bug report on those issues, or are they intentional by design? |
hey @AndrewRybka good to hear you found the reason for the error ! Regarding your remarks, I believe both are related
even though on the same page, we provide examples on how to close the connection, you're right that this part
could be maybe even more explicit, by providing an example, like
|
Hey @sfc-gh-dszmolka, thank you for the clarification. So no plans to support |
Indeed, i'm not aware of such plans for the near future. |
After upgrading our .snowflake nuget package from 3.1.0 to 4.3.0, we are starting to get randomly error of:
Could not obtain a connection from the pool within a given timeout
You can see from the graph below, once a pod gets to this state, nothing works anymore and it must be restarted, which fixes it immediately.
Any idea what this is all about and how it can be addressed?
What version of .NET driver are you using?
4.3.0
What operating system and processor architecture are you using?
Ubuntu ARM
What version of .NET framework are you using?
E.g. .NET core 8
What did you do?
The text was updated successfully, but these errors were encountered: