OctoPi losing network connection mid-print

What OS is the NAS running? OctoPi is built on Raspberry Pi OS, generally we have seen similar issues across the Raspberry Pi OS distros. If your NAS is running a different OS or generally has a different network stack then maybe they have the bugs worked out... Also if it is ethernet, then it is a different story.

You're right actually, hadn't thought about that - it's running Open Media Vault which I think is based directly on Debian rather than PiOS, although it is on WiFi. Thinking through all my other Pis running PiOS, they all get rebooted regularly so it's quite possible I've just not seen this before quite by chance.

1 Like

Lost network connection again last night - with the Pi set to a static IP in dhcpcd.conf. The mystery deepens.

Any way we can get developers to take a look at network stack? It begins to look like a real bad bug. OctoPi is network based.

Just about everyone that regularly reads this forum is NOT an RPi OS developer. OctoPi is a custom packaging of the Raspberry Pi OS so network stack expertise isn't required there either.

My suggestion, take this issue to the https://www.raspberrypi.org/forums/.

1 Like

Every OctoPrint-involved person is aware of this issue, since it generates a fair amount of noise across the community. But it is a long way out of scope for anyone here to look at. Also, the 'network stack' is (afaik) closed-source, so even if someone was to look at it and had the capability to fix it, they would probably have to be hired by RPiF or Broadcom first.

1 Like

I'm trying to solve this, here and in the R-Pi community, the Linux general community, and the RetroPi community....so a real shotgun approach. I'm not a developer, but I have a reasonable amount of experience with Linux and networking. It's so hard to test because I can't find a condition that repeatably creates the problem - only that randomly the network goes down at some point on almost every long print.

So far I have tried, without success:

  • Set my Pi to a static IP in dhcpcd.conf (as the Pi is static, my mesh won't now let me set a static on the router DHCP)
  • Turned off power management to the WiFi on the Pi (although I -think- this is a red herring as I'm not sure the setting actually does anything)
  • Run a CRON job to ping the network every 5 minutes and reset the WiFi (this doesn't work - I can't find any command that will bring the network back up, although I keep trying)
  • Set a constant ping to the Pi from another network client - this -appears- to keep the Pi alive although I've not tested it for long enough to be sure

On my system I run with a touch screen on the Pi, so at least when the network goes down I can connect a keyboard and try things without having access to SSH.

1 Like

Not everybody has this problem so I'm going to speculate that the local WiFi environment may have something to do with it. If I had this problem, I'd try a different WiFi channel. There are WiFi analyzer apps available for most cell phones which can be used to see your local channel activity and help you pick the best (i.e. least used) channel.

I was having this problem as well. It seems that sometimes the Pi's WiFi stack would loose its mind and reset to what I think I remember being mentioned in other threads the Pi's default IP address.

I've been keeping quiet because I don't remember what that IP address is and I solved my issues by going wired. (I also got myself a PoE switch and a PoE hat so my Pi is being powered by the same cable as the network connection.) But I didn't think just saying "go wired" really helps the situation... :wink:

You can add me to the list as well. Raspberry Pi 3b+ randomly drops wifi connection.

-Sometimes just comes back on it's own if you wait long enough, however rebooting the pi fixes it instantly.

-Can't ping via hostname or IP. IP is assigned via static DHCP. "Destination host unreachable" when attempting to ping.

-Not a hardware issue, I have multiple raspberry PI's - I swapped SD cards between to PI's, and the problem remains with OctoPi. The other one works perfectly and maintains it's connection. OS on the other is Raspberry Pi OS.

-Interestingly, on the other RPi I have Pi-Hole running, and I can see DNS requests. Every 15 minutes the OctoPi does it's connectivity check to Octoprint.org successfully...so it seems it's able to resume it's wifi connection when it wants to. Connection goes back down when the check is complete. But the PiHole log show it reliably every 15 minutes. Like clockwork.

-I have no reported power supply issues, but I tried swapping the power supplies for the PI's as well just to rule it out.

-Fresh install on the SD card did not resolve the issue. That said, I immediately did an apt-get update && apt-get upgrade, So I didn't wait to see if a fresh install (no updates) would resolve the issue. During the updates I noticed that wpa_supplicant was getting some updates...now I'm curious if an update is causing the problem? Might try to reflash the SD card again.....

I have the same problem, both with Raspian where I manually installed Octoprint onto my Pi 4B, and now with a different SD card and OctoPi.

My kernel is filled with this:

I've suspected that it's the Wifi chip when it's under a lot of load, but I've now tried replicating that without OctoPrint and my connection is stable. But the Pi was also closer to the Router in the test, so it probably didn't try to switch between my 5Ghz and 2.4GHz network. I'll try again later in the original location

1 Like

Hey Folks,

This won't be just another "I'm experiencing this too" reply. I've narrowed my cause down to Cura and remote print via API.

What I've noticed is that if I leave Cura open on the "Monitor" tab for 30 minutes after initiating a print via API, my RPI 3b's wifi kicks out (Sometimes I leave it like that so I can watch the status of the print). If I initiate the print via API and then close Cura, it's smooth sailing with no loss of connectivity.

This may not be the case for all of you, but I would encourage those who use Cura with API print to test this.

Regards,
Gizmobuddy

Same thing happens to me. If I donโ€™t watch streaming, the better chance Pi will stay connected.

Thanks to OctoPrint app not offering free service after 15 hours. Guess I wonโ€™t be watching my prints. ๐Ÿคท

Technically, OctoPrint isn't providing the webcam stream at all; it's just allowing you to look at it within the web interface and using mobile apps, etc. There are other options that may perform better, like HLS or the recent attempts at webRTC integration that may not tax the pi as much. Still, we are still struggling with a SBC device that is picky about power and has crappy closed source broadcom wifi drivers. Many people have reported using a network cable resolves this issue too.

I experienced the same problem. Now that I close cura after the print has started the problem is gone.

Thanks for this solution.

1 Like

I will just mention that it continues to run just fine if I pull up the stream on my local pc via VLC. So watching on Cura = bad, streaming video otherwise = good :smiley:

I've even gone ahead and added the stream to my in home BlueIris surveillance system, and it works great. Cura remains the 100% guarantee to crash the networking on octoprint for some reason.

I have also had similar symptoms with a pi 4b 4g, and a short wile ago while doing further physical checks (including lifting the pi up to check all points on the board), the power connector fell off(while still attached to the genuine pi4 power supply), so put a pi3b and genuine power supply in place and it is currently working(but at present have not started a print yet

Are you solved this problem? I have same....

Instead of asking in some old threads you may open a new proper thread in GetHelp Networking with sharing all the information that are requested.

We found out that the same can sometime can be very different.

I'm sorry, but from what I can tell from this thread not a single person who has had this issue has actually solved it in any other way than just starting from scratch with a new Pi. What good is starting another thread going to do if they people in this thread already can't be helped? If anything keeping it in one thread will make it easier to keep advice together without having to repeat yourself in every new thread with other people having this apparently common issue.

For what it's worth, I have the exact symptoms as everyone else here. The Pi disconnects mid-print but the printer keeps going. Nothing's overheating, I've got a huge heat sink that's properly installed plus some active cooling fans. I'm also using a Raspberry Pi 4B after having previously used a 3B+. I can't SSH in or ping it, only a reboot of the Pi helps. Which sucks, as being able to monitor the printer from another room was the whole reason I even got Octoprint in the first place.

1 Like