WebUI: Memory consumption going through the roof

What is the problem?

Quickly after using the web ui, especially when printing, the memory consumption is spiking and reaching as high as several gigabytes (until the whole available memory of the pc, 16 GB, is depleted).
I use Firefox on Windows 11 but also saw the issue when using Windows 10.
On Chrome the memory consumption does not appear to spike. But the browser is lagging instead.

What did you already try to solve it?

I'm currently trying to disable plugins to see whether one of those is to blame.

Have you tried running in safe mode?


Did running in safe mode solve the problem?

does not apply

Systeminfo Bundle

browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0
connectivity.connection_ok: true
connectivity.enabled: true
connectivity.online: true
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: true
env.hardware.cores: 4
env.hardware.freq: 1500
env.hardware.ram: 3971153920
env.os.bits: 32
env.os.id: linux
env.os.platform: linux
env.plugins.pi_support.model: Raspberry Pi 4 Model B Rev 1.4
env.plugins.pi_support.octopi_version: 0.18.0
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 20.3.3
env.python.version: 3.7.3
env.python.virtualenv: true
octoprint.safe_mode: false
octoprint.version: 1.7.0
printer.firmware: Marlin bugfix-2.0.x-mfs (Sep 16 2021 10:23:57)
systeminfo.generator: systemapi

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
OctoPrint: 1.7.0
OctoPi: 0.18.0
printer: Ender 3 v2
firmware: latest stock (version currently not at hand, probably not relevant anyway)
browser: Firefox 93
OS: Windows 11

(The process is really OctoPrint because the OctoPrint tab, and only the OctoPrint tab, dies if I kill this process.)

Did you open the GCode viewer tab at any time when this happened? The GCode viewer is the most memory-hungry component by a large margin in normal circumstances, if the GCode file is large enough. If you use the GCode viewer, please also mention the typical file size for your GCode when this issue appears.

And testing this without plugins is really important, it is not that unlikely that this is simply a misbehaving plugin. I'd also test this while disabling any browser extensions.

Hello @umrath

This is not the systeminfo bundle .

If you are running OctoPrint 1.7.0, you should have seen this:

1 Like

As already mentioned on Twitter a couple week ago (I think), I'm pretty sure this is one of the third party plugins which running in safe mode would confirm. Manually disabling one after the next is of course also going to help narrow it down.

And as already pointed out, we'd actually need the whole bundle, not just the summary.

1 Like

Sorry, I misunderstood the guide here.
Systeminfo attached.
octoprint-systeminfo-20211025122249.zip (3.3 MB)

But does that explain Gigabytes of data being consumed?

If the GCode is large enough, it can use multiple Gigabytes of RAM. But it probably doesn't explain this particular case. The most likely culprit here is a plugin. And it looks more like a memory leak and not just excessive memory usage.

1 Like

Manually opened the GCode viewer right now. Memory usage (currently around 1GB) is unphased.
In general the memory consumption is rather stable right now.

Update: I've re-enabled the Dashboard again and it seems that the memory consumption started to increase, but much slower than previously. I'm at 1.4 GB now, slowly rising.
Update2: Printing a longer job. Now 1.8 GB, still rising. But much slower than otherwise.
Update3: Over the night the consumption increased further to 2.6 GB. The print is done but the memory usage remains as is.
Update4: Next print. The memory consumption is jumping wildly, even withouth the print having started yet (currently waiting for bed expansion to do the leveling.) It dropped to ~1.1 GB right before I started the print and now jumps between 4 GB and 2.5 GB (while doing the leveling).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.