-
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
OOM on AKS (docker container) in version above 1.2.6 #432
Comments
We are running into this issue as well. Had to revert to an older version of the driver. Very frustrating. |
any information? are you going to look at it at all? |
@ppiwow-apay None of the tests cover AKS, but I don't think that should be relevant. If there is a memory leak then that should have surfaced on other environments. |
@ppiwow-apay I also recognize that we have been late in responding to you, so sorry about that. Given that your post was back in March, can you clarify what version of the .NET driver you were using at the time and have you been able to reproduce that same behavior with the latest version? |
The last I tried was the newest version, I could try once more but need some time to update and get memory dumps. all version over 1.2.6 (we updated from time to time) was affected. locally on the machine or locally on docker all seems to work fine, and only on aks does this issue occur. |
@sfc-gh-jfan We have seen some similar behavior. I have been testing this recently with v2.0.16 and Dapper 2.0.123 on dotnet 6. Our simple app spins up 20 tasks and runs this in a loop. When using dapper, the memory usage of the app running in k8s more than doubled over 6 hours.
|
Hi, in our tests we recognized that a memory leak was on calling ctor:
we made tests with only creating new connection and it was enough. |
I can confirm what @ppiwow-apay is reporting. We trimmed down our sample to remove dapper and use a minimal setup, and am seeing the same behavior. |
I am seeing the exact same behavior. Stripped down the application to the basics and seeing the same memory issues. |
any news on that? |
@sfc-gh-igarish any news on that? |
There are some questions: I found something maybe related to this OOM issue. On this link, they said .net 5 and 6 for workstation GC are all pass, but they are failed on Server GC, so the customer may have the same issue. for example, the following heap count is 10, they may have to increase this. and it said they need 3190MB to get the GC pass. I hope this can help. At the same time we continue looking into it. |
@sfc-gh-igarish - me and @ppiwow-apay work together. We're using workstation GC everywhere, so it's not an issue with server GC. Various services have different RAM limits, but overall it's in the 256-512 MiB range. Please keep in mind that 1.2.6 keeps working for us (no issues), but once we move forward with just this package (same runtime image), OOMs happen, so I wouldn't look for blame in runtime. edit: I don't think this was stated anywhere earlier plainly, but we're running the containers on Azure Kubernetes Service, on linux worker nodes. Base image is |
There's a repro repository I've made 2yrs ago: https://github.com/amis92/net-snowflake-memoryleak |
I have ran the docker images based on repro repository locally and found no big differences between several driver versions. The 2.0.25 driver version was ran on .NET6, whereas rest of the tests on .NET5. It seems to be rather consistent:
The OOM in AKS may be related to some kind of unexpected behavior within the dotnet runtime even when using the Workstation GC as pointed by the issue in dotnet/runtime#49317 which indicates that the GC does not work as expected by the user. One of the comments points that switching to the alpine version of the dotnet image fixed their problem whereas other comment advised to tinker with the GC settings. I hope this can help you with your issue. |
hey all - seems like the issue is not reproducible with the recent versions of the Snowflake .NET driver and also seems to be related to an unexpected behaviour of the runtime itself. therefore i'm now marking this issue as closed, but please feel free to comment if you have a reproduction scenario which proves evidence for bug/unexpected behaviour in the recent versions of Snowflake .NET driver and then I'll reopen and we can continue troubleshooting. |
Issue description
On the local machine all works fine on each version, but when we deploy it to docker image and release it to AKS new SnowflakeConnection causes OOM on POD. From our investigation it seems na ctor of this class allocates huge amount of memory.
Does this connector support usage on unix docker image?
All works fine till version 1.2.6.
Both net 5 and net 6 have this issue. If you need any additional information let me know as there
The text was updated successfully, but these errors were encountered: