Duetlapse crashes randomly and stops recording
-
plugin keeps crashing - starts fine then after a little while crashes.
sometimes it is possible to restart from plug in section and sometimes need to reboot Pi.
Log file is attached.
it happens fairly oftenRunning DSF with 3.5.0-beta.4
-
Hi,
The problem is that the internal connection to the Printer has stopped responding. Its not that DuetLapse has crashed.This is a sometimes, common issue with Raspberry pi , where the wifi goes into power save mode. Another reason can be too manny connections to DWC. If these thing s happen DuetLapse is simply reporting an external event.
One thing worth trying is (1) upgrade to 3.5.0 RC1 - because I tried to mitigate this with a "localhost" conne ction to the printer, or (2) stopping the raspberry pi (or other computer) from going into wifi sleep mode.
For (2) - the method I use is to create a systemctl unit file that disables wifi power save.
[Unit] Description=Set WiFi power save off After=sys-subsystem-net-devices-wlan0.device [Service] Type=oneshot RemainAfterExit=yes ExecStart=/sbin/iw dev wlan0 set power_save off [Install] WantedBy=sys-subsystem-net-devices-wlan0.device
-
Over the years, DuetLapse3 has ended up with a lot of defensive code to account for problems in other areas (like Wifi connections randomly dropping). I was able to take a closer look at your logsfile and noticed that the code to attempt reconnects was not being called (forgot to take out a comment during my last round of beta testing).
Note that this code cannot fix the root cause, it just loops and tries to reconnect - hoping that the wifi connection restarts. In many applications - this would not be sensible, but for DuetLapse, it does not matter if it cannot capture anything during the middle of a print.
I would encourage you to at least disable wifi power save as I have found that to help with the disconnects.
I have been meaning, for a while now, to make another related change to hopefully mitigate issues with Wifi. In theory, it should not make any difference but its one of those things that can't hurt. When I have that done I'll let you know.
-
Try this. The change I made is this: If Duetlapse is running as a plugin, it will switch its printer connection to use the internal loopback. This should completely bypass the Wifi. In theory, the operating system is supposed to automatically use the loopback for internal traffic. I suspect that either it does not or there is some other issue at play.
-
@stuartofmt thank you Stuart. I will give it a go and will let you know if there is an issue. If you will not get my annoying messages that means that you did great job and it is working
-
@Aurimas said in Duetlapse crashes randomly and stops recording:
@stuartofmt thank you Stuart. I will give it a go and will let you know if there is an issue. If you will not get my annoying messages that means that you did great job and it is working
Just an FYI. I build this against rc.1 but it should be fine for the beta version you are on.
-
@stuartofmt nope
got a tick on firmware only - it is complaining about DSF and DWCRepRapFirmware
Version 3.5.0-beta.4
Duet Web Control
Version 3.5.0-beta.4
Duet Software Framework
Version 3.5.0-beta.4 -
@stuartofmt all good now - updated the firmware.
will see how it goes. thanks