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 leaks on a huge amount of requests #192

Open
Ispolin08 opened this issue Mar 6, 2024 · 4 comments
Open

Memory leaks on a huge amount of requests #192

Ispolin08 opened this issue Mar 6, 2024 · 4 comments
Labels

Comments

@Ispolin08
Copy link

Hi. I have around 500 coroutines which is performing INSERT sqls around 200qps. I have memory leak in this function. If I comment the query call everything became ok. I am new in async stuff, could you give me some advice how to fix it?

I don't need to use any then and etc. Just parrallel inserts. Unsets and gc already done but didn't help.

Thanks a lot!

@yadaiio
Copy link
Contributor

yadaiio commented Mar 18, 2024

Thanks @Ispolin08 for bringing this up, definitely an interesting one.

As I talked with @SimonFrings about your question, there are no known memory leaks in our project. If you think you found one anyway, we need more information in order to confirm this. Can you share some of your output that makes you believe this is a memory leak and maybe the part of your code where this occurs. It would also be helpful to have some additional tests to reproduce this behavior. Is this something you can look into?

FYI: There are similar questions asked in #179 or #173.

@DubbaThony
Copy link

It is not a memory leak, but I have an idea where the conclusion comes from as I just hit similar issue.
If database can't keep up serving the queries, than the MysqlClient->pending array will grow out of control.

I would love a simple getter to get queue size, so I can monitor it and throttle production of queries when needed.

@WyriHaximus
Copy link
Member

It is not a memory leak, but I have an idea where the conclusion comes from as I just hit similar issue.
If database can't keep up serving the queries, than the MysqlClient->pending array will grow out of control.

I would love a simple getter to get queue size, so I can monitor it and throttle production of queries when needed.

Monitoring your MySQL server for high load should yield you the same information. Assuming it's an storage/CPU performance issue on that end.

@DubbaThony
Copy link

Whenever server gets loaded up, querying db for this adds one more item to queue, requires traffic on socket, etc, while it could be locally checked with fairly simple getter. For my case I've hacked it with Reflection and it is very helpful. Especially if main concern is local RAM usage.

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

No branches or pull requests

5 participants