Diagnose "Timer too close" event

Knowing there can many issues that result in a “timer too close” situation, I luckily haven’t had one in a long time, that is until today. I’m really looking to figure out why it happened so corrective action can be taken.

SBC: Odroid XU4 (big.LITTLE) 2Ghz, 2GB RAM, plenty of free space on the eMMC, running moonraker and Mainsail.
MCU: Arduino MEGA 2560
MCU_Z: Adafruit Metro M4 (yea more power here at the moment)

At line 48836, I have a Exiting SD card print (position 755582)

Shortly before this, the sysload spiked to about 90%. There wasn’t any extremely fast moves in the gcode, as it was literally almost done

Thankfully, this print was almost done and the last couple lines will not be noticed or missed.

attached ZIP file contains the entire klippy.log. If you are not comfortable with the zip file, I can cut out the last portion of the log and post that.

Thanks, in advance, for you time.

klippy.zip (3.9 MB)

MCU 'mcu' shutdown: Timer too close
This often indicates the host computer is overloaded. Check
for other processes consuming excessive CPU time, high swap
usage, disk errors, overheating, unstable voltage, or
similar system problems on the host computer.
Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown

Well, it is what the error message already told: The communication between the SBC (RPi or similar) and the MCU was delayed enough to make Klipper error out.
Some unusual system load, webcam etc.

Also looking at the load of your MCU, you can probably consider yourself lucky that it did not error out earlier (albeit it would have been a different error message)

Thanks the the reply. I’ll have to look at all the running pieces. I recently installed moonraker/mainsail on the SBC that also has Octoprint. All recent jobs were moonraker/mainsail jobs.

Previous to this, I’ve only seen high system load during Timelapse generation, which did not happen when Klipper shutdown.

My guess could be due to Octoprint services doing something, (going out to GitHub and performing a system check?). Maybe be Moonraker-Telegram? I’ll have to investigate this one more.

How did you generate the graph from the log file?

See Debugging - Klipper documentation