Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB Service at 100% CPU

I'm starting to learn to use MongoDB and are trying to get a local server running, but when I run the command to install the service:

mongod --install --serviceName MongoDB --serviceDisplayName MongoDB --logfile C:\MongoDB\log.log

And start the service, it uses 100% CPU and consequently my workstation sounds like its taking off.

I haven't even done anything yet and it's running at 100% CPU. This is on 32-bit Windows 7 with a Core 2 Duo 3.16GHz and 4GB ram.

I've tried searching Google, but none of the high CPU usage results lead to anything.

like image 297
Nick Bedford Avatar asked Oct 22 '25 10:10

Nick Bedford


1 Answers

Sometimes MongoDB has issues with the lock file in the data folder if it wasn't closed cleanly. Make sure that the lock file does not exist before attempting to start the service.

If this is the problem, you can usually observe the behavior by watching the process in Task Manager and observing the PID in a constant state of flux.

like image 148
Matt Beckman Avatar answered Oct 25 '25 09:10

Matt Beckman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!