MCU shutdown due to RAM issues

Basic Information:

Printer Model: Sidewinder X2
MCU / Printerboard: Ruby board
Host / SBC Pi 3B (non +)
klippy.log

Recently my installation started this weird behavior of using all of the RAM (visible in Machine tab) for a minute and then recover.

This mostly happens shortly after booting up, but sometimes even later and while printing, making the print fail due to ‘Timer too close’.

I ssh’d into the PI and used the top command when this happens. Turns out its Python clogging the RAM.

Anything more I can do to trace this down?
klippy (5).log (291.5 KB)

I’d first try

ps aux | grep python

See if it’s trying to run anything besides klipper/moonraker

here is the info:

pi@KlipperPi:~ $ ps aux | grep python
pi         387  3.7  0.9  57508  7024 ?        S<sl 08:41   0:10 /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py /home/pi/printer_data/config/printer.cfg -l /home/pi/printer_data/logs/klippy.log -I /home/pi/printer_data/comms/klippy.serial -a /home/pi/printer_data/comms/klippy.sock
pi         589  7.6  1.3 308384 10240 ?        Ssl  08:41   0:21 /home/pi/moonraker-env/bin/python -m moonraker -d /home/pi/printer_data
pi         591  2.6  0.8  34492  6116 ?        Ss   08:41   0:07 /home/pi/mobileraker-env/bin/python /home/pi/mobileraker_companion/mobileraker.py
pi         602  0.0  0.0   3756     0 ?        S    08:41   0:00 /usr/bin/xinit /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py
pi         949  9.0  1.9 242356 15004 ?        Dl   08:41   0:24 /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py
pi        1485  0.0  0.0   7468   444 pts/2    S+   08:45   0:00 grep --color=auto python

I was wrong, here is the culprit. Some git stuff

pi@KlipperPi:~ $ ps aux --sort -rss
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
pi        1405 74.5 70.9 662396 540464 ?       R    08:57   0:46 /usr/lib/git-core/git pack-objects --all-progress-implied --revs --stdout --thin --delta-base-offset -q```

You might run

git gc

and let it clean up any git garbage you have. You have a lot of extras running along with Klipper so no telling which repository it’s getting stuck on.

Tells me “nothing new to Pack” :person_shrugging:t2:

For the record:

I found the culprit.
I installed some scripts/addon to automatically backup the config files on my Github repository.

This required installing the gcode shell command plugin.

Havent had this issue anymore after removing both the backup addon and the gcode shell stuff.

2 Likes

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