Print randomly freezes with RPI 3B+


#1

What is the problem?

Some prints are just aborted. The PI shut down suddenly, the red power light is off.

What did you already try to solve it?

Purchased the official Raspberry power supply. Still happening.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

Raspberry PI 3B+

OctoPrint 1.3.8
| Bed Visualizer (0.1.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bedlevelvisualizer
| CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
| Octolapse (0.3.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_octolapse
| OctoPrint Anywhere (0.6.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_anywhere
| hardware:
| cores: 4
| freq: 1400.0
| ram: 918192128
| os:
| id: linux
| platform: linux2
| plugins:
| octopi_support:
| model: unknown
| revision: a020d3
| version: 0.15.0
| python:
| pip: 10.0.1
| version: 2.7.13
| virtualenv: /home/pi/oprint

octoprint.log snippet:

2018-06-13 08:34:14,213 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2018-06-13 08:34:14,227 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2018-06-13 08:34:14,247 - octoprint.plugins.octolapse - INFO - Octolapse is loading assets.
2018-06-13 08:34:14,466 - octoprint.server - INFO - Shutting down intermediary server...
2018-06-13 08:34:14,707 - octoprint.server - INFO - Intermediary server shut down
2018-06-13 08:34:14,708 - octoprint.events - INFO - Processing startup event, this is our first event
2018-06-13 08:34:14,709 - octoprint.events - INFO - Adding 0 events to queue that were held back before startup event
2018-06-13 08:34:14,710 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2018-06-13 08:34:14,734 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2018-06-13 08:34:14,747 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for _http._tcp
2018-06-13 08:34:14,757 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for _octoprint._tcp
2018-06-13 08:34:14,761 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for SSDP
2018-06-13 08:34:14,762 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2018-06-13 08:34:14,850 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:34:14,871 - octoprint.plugins.bedlevelvisualizer - INFO - OctoPrint-BedLevelVisualizer loaded!
2018-06-13 08:34:14,880 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:34:14,886 - octoprint.plugins.octolapse - INFO - Loading existing settings file from: /home/pi/.octoprint/data/octolapse/settings.json.
2018-06-13 08:34:14,888 - octoprint.server.util.sockjs - INFO - New connection from client: 127.0.0.1
2018-06-13 08:34:15,468 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2018-06-13 08:34:15,669 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:34:15,779 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.1.14/'}
2018-06-13 08:34:15,789 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2018-06-13 08:34:28,887 - octoprint.server.preemptive_cache - INFO - ... done in 13.11s
2018-06-13 08:34:28,888 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://219.75.2.85/'}
2018-06-13 08:36:53,097 - octoprint.server.preemptive_cache - INFO - ... done in 144.21s
2018-06-13 08:38:45,707 - tornado.access - WARNING - 404 GET /manager/html (127.0.0.1) 23.73ms
2018-06-13 08:39:36,644 - tornado.access - WARNING - 403 POST /api/plugin/anywhere (127.0.0.1) 26.66ms
2018-06-13 08:39:38,447 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.13
2018-06-13 08:39:42,033 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial port"
2018-06-13 08:39:42,266 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial port" to "Opening serial port"
2018-06-13 08:39:42,277 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2018-06-13 08:39:42,311 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-06-13 08:39:51,519 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting baudrate" to "Operational"
2018-06-13 08:39:51,539 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-06-13 08:39:56,631 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.8 (Github)"
2018-06-13 08:39:56,655 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2018-06-13 08:39:59,220 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Printing"
2018-06-13 08:40:05,412 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-06-13 08:46:04,946 - backoff - ERROR - Backing off forward_ws(...) for 0.8s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:05,746 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:05,747 - backoff - ERROR - Backing off forward_ws(...) for 0.0s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:05,782 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:05,783 - backoff - ERROR - Backing off forward_ws(...) for 0.6s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:06,406 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:06,410 - backoff - ERROR - Backing off forward_ws(...) for 0.6s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:06,986 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:06,987 - backoff - ERROR - Backing off forward_ws(...) for 2.6s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:09,576 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:09,577 - backoff - ERROR - Backing off forward_ws(...) for 2.0s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:11,537 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:11,538 - backoff - ERROR - Backing off forward_ws(...) for 6.6s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:18,187 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:18,189 - backoff - ERROR - Backing off forward_ws(...) for 10.5s (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:28,726 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:28,728 - backoff - ERROR - Giving up forward_ws(...) after 8 tries (WebSocketConnectionClosedException: Connection is already closed.)
2018-06-13 08:46:28,729 - octoprint.plugins.anywhere - WARNING - Reached max backoff in waiting for server ws connection
2018-06-13 08:46:29,019 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:46:29,883 - octoprint.plugins.anywhere - WARNING - Not connected to server ws or connection lost
2018-06-13 08:49:08,577 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-06-13 08:50:22,057 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.1.13


#2

Hi
a few people seems to have these freeze and they all have OP Anywhere installed

I too have this problem, and the culprit seems to be octolapse (I don't have OP Anywhere)

So, can you try with OP Anywhere disabled, and then with Octolapse disabled to see if something change ?


#3

Good point. I will give it a go. Thanks. But do you think the plugin draws too much power? Or does the camera?


#4

Looks like you're not the only one with a Raspi3B+ with this problem.

Running vcgencmd get_throttled should return a variable throttled=0x50005 which ought to be zero if no throttling is occurring (either due to under-voltage or that it's too hot). Following up, a vcgencmd measure_temp (with my own output of temp=41.9'C) will show you if it's looking hot or not which could then rule out temperature.

The low threshold for input power is 4.65VDC, I believe.


From anecdotal history, the printer manufacturer I was working with got in a huge batch of Raspberry Pi 3 computers in which the micro-USB power connector appeared to be too wide, for want of a better description. There wasn't anything wrong with the pins, just the surrounding metal sleeve that normally holds the cable tightly. The power cable then didn't have a perfect/tight connection and with all the typical movement/vibration inside a 3D printer, the power would be intermittent. Check the physical matchup of the Raspi's power cable at the micro-USB side of things. Is it tight or loose?

If you'd like to test this theory, you can loop a rubber band around the micro-USB cable itself as close as you can to the micro end (do that thing where you tuck the remaining loop of the rubber band through itself) and then finally, put the remaining loop of rubber band over the Raspi itself.

If that seems to make the problem go away, then you could power the Raspi from the 5V pins if you wanted a cleaner solution.


#5

Running a 3B+ canakit, with usb mouse, keyboard, logitech webcam and MakerGear M2. NO octolaps, it did not support the M2 so I removed it it after trying to see it it would work. NO freezing issues, so maybe the octolaps or hardware.. Not inherent to the 3B+ in general.


#6

Can I say "me too" here ?

It only happened once, and the output from the throttle test says throttled=0x50000

It happened at the same moment that my internet went down, so I just assumed it had something to do with that cuz that particular printer is kinda tied to Alexa in a way


#7

This happens to me aswell, unfortunately quite often (average once per 24 hours)

Running official adapter (2.5 A) and not getting any low voltage errors in log files whatsoever.
I do run octolapse and always record lapses with the directly connected logitech C920 webcam. I dont use an external powered USB hub.
Sometimes I can run a print for 40 hours and no problem. Other times it freezes on small prints. Its totally random. i have disabled GCODE viewer just to relieve som strain but it still freezes.
During the freeze nothing is outputed to the log files (kernel, system, syslog). I have ssh and tail -f enabled for all three logs to see what is happening. octoprint.log shows nothing either. The pi is not reachable via IP and need to be powercycled hard in order to start working again. The power led is still lit however.
I have also ran an extensive benchmark on the pi, that raised the temp to over 80 degrees celsius for over an hour and no crashes whatsoever. Normal running temp with octoprint and octolapse is around 55 degrees celsius for me so temperature should not be an issue.

I also did a fresh reinstall a couple of days ago to remove any possible memory corruption from the equation but it still crashes.

The main reason for me to run octoprint is to monitor prints and create timelapses with octolapse so having to disable octolapse kind of defeats the purpose, but I guess I will have to try that next.

It is so frustrating not being able to see any hints in logs to what the error is. Maybe I just have a faulty pi (or a faulty SD card) but even so, should there be any kernel panics in the logs?


#8

It's well worth trying to find a standard (non-plus) version of the Raspberry Pi 3B and drop that in as a replacement. The plus version is known for freezing like this.

Read earlier in the thread for suggestions about slowing down the processor a little back to the earlier rates to see if this helps. (Think: the processor isn't allowing the RAM to be written yet and it's crashing as a result.)


#9

I disabled Octolapse and ran the printer for weeks. The issue is gone. I haven't tried the built in timelapse though yet.


#10

Oh, I didnt know that!

It just crashed again 1 hour into a print. I have disabled octolapse now in the plugin manager and will try the same print again to see what happens. Either way I will surely replace my B+ for a B first thing tomorrow!


#11

The built-in timelapse works great. It just doesn't do that fancy take-photo-from-center-of-layer thing that Octolapse does.

It's possible that any timelapse will trigger a plus version of the Raspberry Pi 3B to be in the danger zone; it takes a lot of RAM and processing to generate the images.


#12

Why only the plus version?


#13

There are a few subtle differences. The system-on-a-chip is the same, only it's surrounded in a metal jacket. I'm guessing they thought it could be tweaked to higher speeds this way. The network connectivity chip is different which likely supports faster ethernet than the last.

It's clocked about 15% faster (1.4GHz versus 1.2GHz) but whether or not the RAM can keep up, it's difficult to say.

3B+ lockups


#14

Hmmm, with that in mind, no newer Octopi version would fix this..


#15

My nightly print (7 hours) completed without a hitch now when octolapse was disabled.
Guess it was the culprit and downgrading to normal B-version is my only out.


#16

Or... clock it down to the old Raspi3 settings.


#17

Can I clock down with raspi-config?


#18

Possibly.

I think I'd use this advice, though, running things back from that high mark to 1.2G.


#19

there is an option to overclock the sdram as well... i will give both a shot


#20

And remember, the Raspi will go between two endpoints: low and high. It will speed up as necessary under load and work its way back to the idle speed when done.