Klipper Python high RAM usage

Hello,

Recently i’m having issues with printing. Errors like “Timer too close” or “Missed scheduling of next digital out event” appears everytime i tried to print any Gcode file.

Time too close error tells that it could be related to excessive usage of host resources, which in fact is true. Just before executing Gcode, the system RAM usage raises quickly, which can be also seen in pictures below (32% and 84% memory usage, before and after start printing). Using top command it can be seen how python klipper process is allocating all that memory with also high CPU usage.

My setup is an ARM64 orange pi zero 2 with 1 GB of RAM and 4 cores. I run Klipper with Webcamd, KlipperScreen, Klipper Telegram bot, Moonraker and Fluidd, all updated. This SBC is capable of running a lot more software in background without throttling, which i know as this RAM issue began very recently.

I tested disabling some services (Webcamd, KlipperScreen, Input Shaper, ADXL345 and Resonance tester), printing other Gcodes but nothing seems to work.

I’m using SuperSlicer with Klipper as Gcode Flavor.

moonraker.log (1.0 MB)
klippy.log (357.5 KB)



It does seem that high memory usage was the root cause of the error in the log that you attached. However, I don’t see anything that indicates it was Klipper using that ram. The “top” screenshot only indicates it was a python process and a number of packages use python. You can try running top -c or htop to get more info on the process.

-Kevin

1 Like

Hi Kevin, thanks for your answer.

The issue seems related with moonraker-telegram-bot service, Klipper is now working without problems now that i’ve disabled the mentioned service.