Octopi crashes after a day

What is the problem?

I've been running octopi on my raspberry pi 3 B v1.2 just fine with uptimes in the weeks. So I'm super surprised now that I've upgraded the unit to a Pi 4 B v1.2 the server keeps crashing between 12-24 hrs after boot. When the crashes occur I can't ssh onto it and I'm not seeing it connected to my router. Looking at the unit there's just a solid red led indicator.

I'm currently using the official Pi4 power supply, plugged in to a extension cord. I've also added heat sinks connected the pi fan to it. And have the raspberry pi webcam connected.

What did you already try to solve it?

The thing is after I saw this first popup I flashed the sd card and reinstalled with Raspbian OS, when I did this everything seemed stable. It looks like there's something about the way I've got thing set up with octopi setup.

I've tried several different configurations and even with the Pi running octopi on its own not connected to the printer on safe mode it still crashes.

Below is an example taken from octoprint.log.2021-06-04:

2021-06-04 14:11:53,473 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-06-04 14:11:53,478 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2021-06-04 14:11:53,478 - octoprint.server - INFO - OctoPrint 1.6.1
2021-06-04 14:11:53,478 - octoprint.server - INFO - SAFE MODE is active. Third party plugins are disabled!
2021-06-04 14:11:53,482 - octoprint.plugin.core - INFO - 26 plugin(s) registered with the system:
...
... (skip lines)
...
2021-06-05 13:11:53,665 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-06-05 13:26:53,667 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-06-05 13:41:53,669 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2021-06-05 13:56:53,671 - octoprint.server.heartbeat - INFO - Server heartbeat <3

This continues until the heartbeat stops at some point ~24 hours later

Have you tried running in safe mode?

Safe mode seem to extend the time to crash, from ~12 hrs to ~24

Did running in safe mode solve the problem?

Nope, just delayed the crash.

Systeminfo Bundle

octoprint-systeminfo-20210605212042.zip (48.4 KB)

Additional information about your setup

Webcamd.log

Starting up webcamDaemon...

--- Configuration: ----------------------------
cfg_file:      /boot/octopi.txt
camera:        auto
usb options:   -r 640x480 -f 10
raspi options: -fps 10
http options:  -w ./www-octopi -n --listen 127.0.0.1

Explicitly USB device:
-----------------------------------------------

Found video devices:
/dev/video0
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
raspi
config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Jun  5 16:17:05 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 10
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
 o: www-folder-path......: ./www-octopi/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: 127.0.0.1
 o: username:password....: disabled
 o: commands.............: disabled
Done bring up all configured video device

Goodbye...

Hello @thefabnab !

Please do not post log excerpts.
Please share the systeminfo bundle. (What you shared is just the systeminfo)

This is interesting - I was going to say it suggests the whole Pi has crashed, but then remembered the logs rotated every day. So the next one is likely in the next day's log file.

Unfortunately, network issues are fairly well documented about the forums with the Raspberry Pi 4. There's a range of fixes you might try, including this plugin which will try and restart the network, or at least log when the network is failing to connect - I highly suspect this is your issue. Try installing it.

@Ewald_Ikemann thank you for the pointer. I've uploaded the systeminfo bundle zip via editing my post above.

I'm not sure how else to express my webcamd.log entry as the file is on the order of hundreds of Mbs. I suppose if folks have more questions about it I can compress it.

Thanks for the recommendation, I've installed it and am running it now. I'll be sure to update if I get an uptime in excess of what I've been seeing.

In the meantime I did a quicke grep of my octoprint.log file and found this among other entries:

octoprint.log:2021-06-05 16:17:22,706 - octoprint.plugins.announcements - INFO - Looks like we are offline, can't fetch announcements for channel _octopi from network

So it looks like I have been having network connectivity issues. Hopefully this plugin does the trick. Is there any particular post you can direct me so I can get a better idea what the network issues around pi4's are like?

Probably this post:

2 Likes

It's been a few days and since installing the plugin you pointed me to the octopi hasn't crashed at all. Thanks again for the help!!!

Sounds good - we are still trying to collect data around what is causing this, and if the plugin works for you then that is a definite improvement. Thanks for reporting back :slightly_smiling_face: