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

JAVA high frequent gc - com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler EATs CPU #42

Closed
Kenjee opened this issue Sep 23, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@Kenjee
Copy link

Kenjee commented Sep 23, 2015

i found a bug using "io.vertx.ext.mongo.MongoClient". If MongoDB is unavailable for a minute or less a minute the VertxInstance runs into many small GCs and eats CPU. While MongoDB is back only restart helps.

mongoeatingcpu

while profiling this problem locally i found "com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler" causing the GCs and this uses up to 40% CPU usage. Before disconnection CPU usage was near 0% because i only read periodic from empty mongodb.

TestCase:
MongoClient client = MongoClient.createShared(vertx, this.mongoConfig);
// config is: {"mongo": {"host": "127.0.0.1","port": 27017,"db_name": "notification"}}
Verticle start contains
"this.timerID = vertx.setPeriodic(TimeUtils.MINUTE_IN_MILLISECONDS, INotificationHandler.create(vertx, config()));" and handler reads data by using client

seems to be a problem with

Possible Solution

@karianna karianna added the bug label Sep 23, 2015
@karianna karianna added this to the 3.1.0 milestone Sep 23, 2015
@karianna karianna assigned johnoliver and unassigned johnoliver Sep 23, 2015
@karianna
Copy link
Contributor

Seems like a simple enough fix - PRs welcome!

coniu added a commit to coniu/vertx-mongo-client that referenced this issue Sep 23, 2015
karianna added a commit that referenced this issue Sep 23, 2015
#42 updated mongo-driver-async to version 3.0.4
@karianna karianna self-assigned this Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants