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

Mihai Ionut shared this problem 8 months ago
In Progress

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

Best Answer
photo

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

Note that before restarting NoSQLBooster, please kill all processes that start with "nosql".

Replies (9)

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

Note that before restarting NoSQLBooster, please kill all processes that start with "nosql".

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

photo
1

Hi, I am running 7.0.4 and am still seeing 2 zombie processes stuck at 100% cpu

photo
1

Which os are you using? If you are using a Linux system, please download the latest build 7.0.6, reboot your machine and try it again.

photo
photo
1

I've figured out what was causing the 100% CPU issue. One zombie process is left running if NoSSQLBooster for Mongo is force closed. And after some time, it uses more and more CPU.


Simple clicking on the X button closes all "NoSQLBooster for MongoDB Helper" instances.


I am running macOS 12.01.

photo
1

Actually, this is the orphan process, since its parent is terminated.

photo
1

Kill the zombie process, download the latest build 7.0.8 and try it again.

https://nosqlbooster.com/downloads

photo
1

It's the same in Version 7.0.8 (7.0.8).

If I quit/force quit the main process from "Activity Monitor" it doesn't kill one "NoSQLBooster for MongoDB Helper" instance.


76d83ff87123ee9e34a3dcaac9e0977698cb63cb13fc2bf3451b32cf062e24f6

photo
1

I tried it, can't recall your issue. Before restarting NoSQLBooster, make sure that all processes at the beginning of "nosql" have been killed. The zombie process may have been leftover from the previous version.


And, please don't use "force quit", please exit NoSQLBooster normally or use cmd+ to exit.

photo
1

I killed all processes that start with "nosql". I am using the BetterSnapTool app, and I have set it to close the app when I right-click on the x button. I use it because some apps keep running (still visible in the dock) after they are closed).

But again, I think force quit should close all processes that were started by some app.

photo
photo
1

Using version 7.0.8 on macos 12.1 and also experiencing 100% cpu usage in NoSQLBooster for MongoDB Helper

It happens after app is open for awhile. maybe after waking up mac after sleep...

Need to Force quit via activity monitor to resolve and restart app.

Closing app normally doesn't work. Helper keeps running on 100% cpu even after closing.

Any solution?

photo
2

This should not be marked as solved. This issue is still occurring for me on MacOS Monterrey 12.1 with Intel Chip with NoSQLBooster 7.0.8

As others have stated I need to force close it (`sudo kill PID`) in order to get the threads to close.

I do love NoSQLBooster I recommend it to everyone. However, this is a frustrating bug. Version 7 is great overall though!

photo
1

I tried a few times, but can't recall this orphan process issue.


If you can steadily reproduce the problem, please give me detailed step-by-step steps.

Note that before restarting NoSQLBooster, please kill all processes that start with "nosql".

Please enable developer mode to collect information for diagnostics.


1. cd /Applications/NoSQLBooster for MongoDB.app/Contents/MacOS

2. NODE_ENV=dev ./NoSQLBooster\ for\ MongoDB

photo
1

I believe I can now reliably reproduce on my Mac and it is very simple. It occurs every time that I close by going to the icon in my dock, right clicking, and selecting close.

First I open the app and connect to my local mongo instance. Then:

If I close the application with the x button in the upper left, or if I go to the menu and select quit - it closes properly- no problems, all threads/processes are terminated.

if I use the dock to quit, like in the picture below, a process is left hanging. For me it is every single time.

2988c7abe2fa783109e2495546535e39


If you quit as shown in the image above, then `ps NoSQL` - you'll see the orphaned process.

If you still cannot reproduce after this, I will turn on the developer mode. This is the primary way I close applications.

photo
1

Thanks.

We worked out a new test build to resolve this issue, please download and give it a try.

http://s3.mongobooster.com/download/releasesv7/nosqlbooster4mongo-7.0.9-beta.1.dmg

photo
photo
1

Indeed, it still does this sometimes. Just drained my MacBook's (M1) battery overnight. Closed it yesterday, 2 processes pegged at 100% CPU.


V7 is pretty much unusable for me. Stuck processes, connection timeouts and generally slower than 6.

I'm back on 6. For now it's working just fine. To be honest I wouldn't have bough it with 3 years of support if I would have known.

photo
1

I tried a few times, but can't recall this orphan process issue.

If you can steadily reproduce the problem, please give me detailed step-by-step steps.

Note that before restarting NoSQLBooster, please kill all processes that start with "nosql".

And, the current build is v7.0.8, if you are using the old build, update it to the latest version.

Please enable developer mode to collect information for diagnostics.


1. cd /Applications/NoSQLBooster for MongoDB.app/Contents/MacOS

2. NODE_ENV=dev ./NoSQLBooster\ for\ MongoDB

photo
1

I Have the same problem. Version 7.0.8, CPU loads 100% even after the app is closed.

5a005041c8a0ff55ba4d3a04a298b3c1

photo
1

We worked out a new test build to resolve this issue, please download and give it a try.

http://s3.mongobooster.com/download/releasesv7/nosqlbooster4mongo-7.0.9-beta.1.dmg

photo
1

Same problem with version 7.0.9-beta1

e6d2121790a765cfe9e842010b437372

photo
1

The problem has gone after updating OS to Mac Monterey.

photo
Leave a Comment
 
Attach a file