-
Notifications
You must be signed in to change notification settings - Fork 24
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
Performance degradation because a memory leak in async operations #358
Comments
vjrj
added a commit
to GBIFes/biocache-store
that referenced
this issue
Dec 30, 2019
Closed
vjrj
added a commit
to GBIFes/biocache-store
that referenced
this issue
Jan 6, 2020
Merged
ansell
added a commit
that referenced
this issue
Jan 6, 2020
Merged, and running in production seemingly without error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Async updates in
Cassandra3PersistenceManager
has a memory leak inMoreExecutors
call that create new objects unnecessary.In detail, these MoreExecutors.getExistingExecutorService calls despite of its name that subjects that your a getting some singleton creates new
MoreExecutor.Application
objects:that is causing the memory leak and the degradation.
The symptoms of this performance degradation is in some long task like
process-local-node
. After few millions of occurrences, the records/sec start to degrade until the task start to throw exceptions and timeouts trying to update Cassandra. The logs are like this:This was reported by @shahmanash in this slack thread but we were also suffering in our platform.
Some screenshots of visualvm headdumps of biocache command when this happens:
![Captura de pantalla de 2019-12-27 11-43-32](https://user-images.githubusercontent.com/180085/71574274-6005e600-2ae8-11ea-8eb3-9dac24974b81.png)
I've tested that just moving this
getExsitingExecutorService
out of theputAsync
function solve the issue, and long tasks ends without this performance degradation (and only oneMoreExecutor.Application
object is created. I'll send a PR in short. After patching:This only happens when
cassandra.async.updates.threads > 1
.Other uses of
MoreExecutor
should be verified to detect some similar problems.The text was updated successfully, but these errors were encountered: