-
Notifications
You must be signed in to change notification settings - Fork 32
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
Adds method to unset last response in Client #221
Conversation
…research-php into manticoresoftware-master # Conflicts: # test/Manticoresearch/SearchTest.php
Thanks for the PR @acya-skulskaya |
Hi, sorry I didn't have time yesterday to finish fixing the tests. |
@Nick-S-2018 pls review the PR and help with the failing tests. |
I have a kafka consumer, which works as a demon. Manticore client is initialized one time at start. This consumer adds documents to manticore in bulk, say 100-200Mb at a time. I have noticed a memory leak, it increases every time the consumer adds documents to manticore. Turns out manticore client doesn't clean the lastResponse property after I execute
$index->addDocuments($documents);
- it is understandable that one may need this response later, but it also increases memory usage by ~200Mb for each running demon in my case, which is important when you have 20 of these demons running at the same time. So i have found that unsetting the lastResponse property each time after I add documents solves this memory leak problem