Skip to content
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

Memory leak for mysql #721

Open
thenik opened this issue Aug 19, 2024 · 4 comments
Open

Memory leak for mysql #721

thenik opened this issue Aug 19, 2024 · 4 comments

Comments

@thenik
Copy link

thenik commented Aug 19, 2024

Hi,

Memory leak detected for mysql data via PetaPoco during intensive usage :

image

Any ideas how to adjust it?

@asherber
Copy link
Collaborator

@thenik It's not clear to me what that image is showing. Can you please describe what you think is being leaked, and provide a minimal repro?

@thenik
Copy link
Author

thenik commented Aug 19, 2024

@asherber . Thanks for your question.

This images shows 1 of many reteined objects for my app during 1h of usage.
For this image it is RuntimeMethodHandle .
About 26K RuntimeMethodHandle objects retained for my app during 1h .
image

I used dotMemory for analysis and as you see this RuntimeMethodHandle object came from PocoData.
I do not have an independent code sample that will reproduce that now.

@asherber
Copy link
Collaborator

If I had to guess, I'd say that this is something being kept in PocoData's cache rather than something being leaked. Are you running queries with thousands of different types?

Without some sort of minimal repro, this will be hard to diagnose.

@thenik
Copy link
Author

thenik commented Aug 19, 2024

@asherber Yes, you are right that I found something interesting with PocoData's cache. I call it memory leak =)
I call it memory leak because when I look at my app via TaskManager it could consume up to 2gb RAM if it works more than 1 month
and it came from PocoData's cache as I know now.

Are you running queries with thousands of different types?

no =) I use for this case just 6 types, I marked them on the next image:

image

to be honest I tried to create a demo c# app that will reproduce that, but still without success
1st version was 1 thread version with 1 type
2nd - multithread with 1 type
3d - multithread with 2 types

and there is no my "memory leak"
I do not have idea how to implement an app that will reproduce that now.

if any ideas what I can implement for demo app to reproduce or where to look - welcome.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants