High cpu usage, 2 or more threads stuck at 100%

Mihai Ionut shared this problem 33 days ago
Solved

Hello,

I'm using NoSQLBooster version 7.0.3 and pretty much every time I open it, after a while (a few minutes is usually enough) 2 or more threads "NoSQLBooster for MongoDB Helper" get stuck at 100% CPU usage. Sometimes I even get 4 threads stuck meaning CPU is at 100%.

This also happens in version 7.0.2, did not happen in 6.x.

NoSQLBooster running on Mac Mini M1 and Macbook Pro M1, 16GB RAM, macOS 11 and 12.

I usually have 4 open connections, each with 1000 databases, each database containing about 100 collections.


When the threads get stuck, the app still works as expected, not locking or anything. Even if I close all connections those threads are still stuck.


c8448a798787b5d07881006c3ac54253

Replies (5)

photo
1

We simulated a test environment on the local MongoDB 4.4 server (1000 databases, 500 collections per database), but we could not reproduce this issue.

In order to add the debugger feature, version 7 has made great changes to the background process and updated a lot of dependency packages. It is almost impossible to guess the problem by comparing the code of version 7 and version 6.


Excuse me, what's so special about this connection? Is ssh tunnel used?

photo
1

Absolutely nothing special. No ssh tunnel, plain and simple connections (I usually need 4 connections open at the same time).

Is there any debug info I can send?

photo
1

We have worked out a new test build, please download and give it a try.

https://s3.mongobooster.com/download/releasesv7/nosqlbooster4mongo-7.0.4-beta.1.dmg

photo
1

Well, it seems only one thread get stuck now. As you can see in the screenshot: cold start, connected 4 servers, ran a very simple query returning 1 row (by _id, so as simple op as it gets), then closed all connections => one thread stuck at 100%.

Also note that killing that thread does absolutely nothing to nosqlbooster, no errors or crashes, the app works normal.

9f8caaefac6a6cb148335a797956b805

photo
1

I can't guess why, but such problems are difficult to track and solve if they can't be simulated and reproduced locally.

You can check MongoDB's log to see if there is anything unusual.

And, you can try to turn off disableHardwareAcceleration option.

Menu-> Options -> Options that may affect performance-> Disable Hardware Acceleration

photo
1

Disabling hardware acceleration does nothing. Anyway, that would not be a good solution since the UI is slower after.

What I don't understand is why when quitting the app (using file -> quit, not just the titlebar close button) the app appears to close yet at least 2 processes of nosqlbooster helper remain open, still running, and soon enough they ramp to 100% cpu usage.


What is running in the background that does not close with the app?

photo
1

We have worked out a new build to try to resolve such a zombie process issue, please download and give it a try.


https://s3.mongobooster.com/download/releasesv7/nosqlbooster4mongo-7.0.4-beta.2.dmg

photo
1

Ok... so no more zombie processes indeed. The app exists cleanly now.

No more stuck processes either for the last 24 hours. Tested on both M1 and M1 Pro, so it seems ok now.

There's still one process taking about 40% of one core (so that's about 10% total CPU time) when doing absolutely nothing, not even one query tab opened.


This is not that bad, but it's still weird to use 10% of a cpu doing exactly nothing. (all options that may affect performance disabled except hardware acceleration).


Anyway I'd say it solved for now.

photo
photo
1

resolved in 7.0.4

Leave a Comment
 
Attach a file