So this problem is half way sorted, I just want to leave some info behind if anyone else comes by it. Also, there migh be a hardware issue that should be adressed, I will investigate more later.
So my problem was that I had my prints stop seemingly random mid print, had the web interface saying that the print finished and sometimes it also was kind of buggy, half crashed half working. (I use PI + DUET setup)
Came by a post suggesting to log in to the PI, upgrade it (didn't solve the problem) and try to see the debug panels output:
journalctl -fu duetcontrolserver
This led to the final result, that my air pump was causing the problem. When I had the pump on OUT1 turned on I started getting [warn] messages: (tested it back and forth, the warn messages only appeared when the pump was on)
pi@duet3:~ $ journalctl -fu duetcontrolserver
-- Logs begin at Wed 2021-11-03 05:05:08 GMT. --
Nov 03 07:29:16 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x265e2834, got 0x3062751e)
Nov 03 07:29:16 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x94c03ccd, got 0x81180d1e)
Nov 03 07:29:18 duet3 DuetControlServer[20368]: [info] Selected file /opt/dsf/sd/gcodes/front_man.gcode
Nov 03 07:29:18 duet3 DuetControlServer[20368]: [info] Starting file print
Nov 03 07:29:26 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0xfc3df1c9, got 0xc19fdd44)
Nov 03 07:29:27 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x56424006, got 0x39abb432)
Nov 03 07:29:30 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x82431b0a, got 0x59169acc)
Nov 03 07:29:32 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0xc67e7ab5, got 0x4927b55e)
Nov 03 07:30:11 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x1e69c9a8, got 0x8ecc37a4)
Nov 03 07:30:13 duet3 DuetControlServer[20368]: [warn] Bad header CRC32 (expected 0x09e1282e, got 0x96aeec35)
Nov 03 07:30:13 duet3 DuetControlServer[20368]: [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005)
Nov 03 07:30:14 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0xd38c804b, got 0x927ca711)
And after some time it had enough and just crashed:
Nov 03 07:32:10 duet3 DuetControlServer[20368]: [info] Finished macro file retractprobe.g
Nov 03 07:32:12 duet3 DuetControlServer[20368]: [info] Finished macro file homeall.g
Nov 03 07:40:03 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x1ae22dc3, got 0xbe8f38ae)
Nov 03 07:40:08 duet3 DuetControlServer[20368]: [warn] Bad data CRC32 (expected 0x7e9f4ed0, got 0x13d0eaa2)
Nov 03 07:40:09 duet3 DuetControlServer[20368]: [warn] Lost connection to Duet (Board is not available (no data response))
Nov 03 07:40:09 duet3 DuetControlServer[20368]: [warn] Restarting transfer because the Duet received a bad response (header)
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [info] Connection to Duet established
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [warn] Controller has been reset
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [warn] Failed to find query for object model response
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [info] Aborted job file
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [warn] Lost connection to Duet (Board is not available (no data response))
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [warn] Restarting transfer because the Duet received a bad response (header)
Nov 03 07:40:13 duet3 DuetControlServer[20368]: [info] Connection to Duet established
Sometimes it got so bad that the DCS crahed entirely causing the half working half dead web control interface.
Now, that pump was working without any problem like this for more than a 100hours, now it is completely crashing after 1 hour tops. I think it might be a flyback problem, but haven't started the hardware investigation yet.
FYI: it is a berd air pump, cheap chinese stuff. Has a lot of back EMF I guess.