Octopi high cpu usage (browser side)

Nevermind, I found it, thanks.

Running OctoPrint in safe mode now. CPU load is now normal, no longer 100%.

I will start looking at what plug-ins are being used.

Problem found - It would appear that the Software Update plugin is the problem. If I disable that one add-on the CPU usage is normal.

A big Thank You to everyone for the suggestions. I can actually leave OctoPrint running again and still get other work done!

Will

1 Like

I wonder if OctoPrint either lost its Internet connection or its DNS server. So if it's trying to resolve some server to pull down an update, it would fail and cycle.

That doesn't make sense. The Software Update plugin is bundled and hence also stays enabled in safe mode. If your issues vanished in safe mode, it can't have been the Software Update plugin. It could however have been some other plugin you have installed interacting with the SWU plugin causing this problem.

I'd suggest to re-enable SWU, disable all third party plugins and then start disabling all third party plugins one by one.

Gina,

I was very careful in my testing, and it took quite a bit of time. I disabled all of the plugins and then re-enabled them one by one. When I enabled the Software Update the CPU utilization went back to 100%. When I disabled Software Update the CPU usage went back to normal. Please see attached screen capture. ALL of the plugins are now enabled EXCEPT Software Update.

I have been a systems programmer over 50 years (since the 60's), including working on everything from large multi-processor operating systems to compilers and interpreters. I am very methodical in my testing.

William

That wasn't a dig at your testing.

I'm just saying the current conclusion doesn't make sense as it is inconsistent. You stated that the issue went away when running OctoPrint in safe mode. The Software Update plugin is bundled and hence stays enabled in safe mode. If the issue went away in safe mode with an enabled Software Update it can't be the Software Update plugin on its own or the issue would not have gone away in safe mode. There must be a different/additional factor at play here, possibly another plugin doing something that causes the SWU plugin to consume 100% CPU load (though what, I have no idea at all, the frontend component of the SWU plugin is pretty light weight).

Maybe an uncompleted update. It's known the that recent version of the Bed Visualizer takes a lot of time to update.

Well, something else is still messed up, I can't get the MG Setup to load.

How do I refresh/reload Octopi on the Pi?

Maybe a complete fresh set could be better and more easy.
This can help you
and this maybe too.

I am using the Pi and software that came with my MakerGear printer. If I install a new image like this will it work the same way or do I need some customization?

Thanks,

Will

That is probably a question you should be asking MakerGear, I don't know in what way they've modified the stuff they ship with their printers.

I occasionally notice very high ram usage and have to close and reopen the tab. This seems to happen more if the tabs been open for a while

I received a new SD card image from Makergear a couple of days ago. It comes with Octoprint 1.3.6 installed. After making a backup of it, I installed the card in the Pi and restarted the system. After configuring it using the temporary wifi access point, I restarted the Pi and went to the Octopi web page. Once again it started using 100% CPU (on a dual core E8400).

I did some more testing with this version. I discovered that if I turn off either the Makergear plugin or the Software Update plugin, the cpu usage goes to normal. What's really odd is that turning off Software Update also removed the Makergear setup tab and the Makergear settings. I do not understand why but that's probably why turning off Software Update gets rid of the cpu usage problem, because somehow it's also disabling the Makergear plugin. I have opened up an incident on the Maker Gear support system.

I also downloaded the Octopi SD Card image and restored that to a spare micro SD card. The first challenge was getting it to enable the serial port on the Pi 3. I managed to figure out at least a part of that (wasted a few hours on that!). Then I installed the Makergear Plugin, and it was back to chewing up the CPU on my PC again...

I also discovered that with this version of Octoprint (1.3.9) I cannot make changes to the "Intervals & Timeouts" settings - if I change any values on that page, the "Save" button no longer works...

William

William

Known bug, to be fixed in 1.3.10.

Maybe it's spending a lot of effort trying to find this website...

57%20AM

I'd also just like to point out that my initial diagnosis after the observed behaviour in safe mode (= no issue) that some third party plugin is at fault here was right. And now everyone reading this hopefully knows why I keep on insisting running in safe mode to rule out misbehaving third party plugins - it can save a tremendous amount of analysis time.

1 Like

FWIW - I enabled the Java console and discovered why disabling the Software Update plugin stopped the CPU usage problem. Apparently the MakerGear plugin has a dependency on the Software Update plugin. This is from the Java console:

Could not instantiate the following view models due to unresolvable dependencies: packed_core.js:13173:21
mGSetupViewModel (missing: softwareUpdateViewModel ) packed_core.js:13175:25

... dependency resolution done packed_core.js:13184:9

Still working with MakerGear to try to resolve this problem.

That's what I meant with


JavaScript :wink: Java is a completely different language and these days not really installed in browsers any more.

3 Likes