-
Notifications
You must be signed in to change notification settings - Fork 185
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
[BUG] Memory leak with parallel_bulk on AOSS #871
Comments
@ArnaudParant what's the root cause? Is the server timing out causing the parallel requests to back up? It would be great to turn the repro into a failing test. |
Hi, It does not seem to have an external root cause, no error is raised and documents are even well inserted into the server. The repro is failing on my side when connected to AOSS, taking all the RAM on the machine, pod or something until OOM. |
Don't lose the repro. It's likely a pool being held too long, log, buffering, or something that should have long been garbage collected. Try to add and get a flame graph to see what the process is using memory for? There's a bunch of ideas in https://www.geeksforgeeks.org/monitoring-memory-usage-of-a-running-python-program/, I don't have a favorite one. |
I modified a bit the code with prints and profile.
Unfortunately
I cut the process after a while, but we clearly see that On AOSS side we see that documents are well ingested
The store size in AOSS correspond to the memory increment of |
Check what |
Sorry, I will not have time with my company to do more investigation on it. I just wanted to write a bug report with a code to reproduce, and we'll probably not be the only ones with the issue, I guess. For the moment, we already found a workaround (wrote in my first post) |
Thanks for your help @ArnaudParant! |
Hi,
What is the bug?
There is a big memory leak with
helpers.parallel_bulk
on Amazon Opensearch Serverless.Actually, it almost never return the
success, info
of the input actions and finish with an OOM.It's curious because it does not have the issue on the classic Amazon Opensearch version or Elasticsearch.
How can one reproduce the bug?
Use the bellow code.
What is the expected behavior?
Well return the result of the input actions and no memory leak.
What is your host/environment?
Local machine inserting in Amazon Opensearch Serverless.
Do you have any additional context?
Test code
Just replace
AOSS_HOST
with your actual host.Temporary solution
The text was updated successfully, but these errors were encountered: