1

I had a Raspberry Pi 2 Model B that I used as a media center, running Plex Media Server, connected to a NAS, where the media was stored, and a couple of scripts that would run once an hour (CRON jobs).

So I decided to upgrade to a Pi 3 Model B+, and install basically the same setup. Since I had to download everything again, OS and applications are most likely to have newer versions than my previous setup (although I used to update packages regularly).

But now, my Pi keeps hanging/freezing/crashing every day, roughly at the same time. And the problem is that I have no idea how to debug this.

In this Gist there are some excerpts of /var/log/syslog showing the last ~30 lines before this happening in the last week.

Setup:

  • Raspberry Pi 3 Model B+
  • 32GB SanDisk microSD card (the same I used in the previous setup)
  • Wired LAN (also the same)

  • Raspbian Stretch Lite Linux pi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

  • Plex Media Server (installation guide)
  • Sonarr (installation guide)
  • Transmission (apt-get)
  • Two CRON jobs that I disabled, and the freezing still occurs:
    • ISPMonitor: runs a speed test every hour; tweets the results
    • Subtitle downloader: sweeps my video library, search and download missing subtitles

I don't really know how to debug this further. It's hard to debug anything after it's frozen, because I can only access it via SSH (it's not plugged into a monitor), and SSH won't connect.

What can I do?

Update

I included in the Gist today's log, including everything from time 00:00:00 until the final log at 02:17:05.

I also noticed that the board seems to be quite hot and I go pick to unplug and re-plug the power cord. I started logging its temperature every minute and I will analyse it over time to verify if it might be related.

Update 2 After further experimenting, I pinned Plex Media Server as the cause of the freezing. I've disabled one service at a time, and then after verifying that it would not freeze when PMS was disabled, I reenabled everything but PMS, and waited for the next day: it was still working.

Now I was browsing through PMS's settings, and noticed that it had Scheduled Tasks programmed to start at 2 AM, and now it kind of makes a lot of sense. Now I'll try to tune these settings, look for help at Plex forums and try to understand why exactly it's crashing during one of these tasks.

Guilherme
  • 131
  • 4
  • Have you looked at this post? Different question, but the answers may be helpful. – Seamus Jul 01 '18 at 19:27
  • @Seamus the temperature seems to be pretty consistent at a 47°C - 50°C range. I'll start logging the core's voltage and clock – Guilherme Jul 01 '18 at 21:44
  • I'm confused. I see 7 different sets of logs in the gist; what are they supposed to tell us? In log 7, you have comments that indicate you think everything is fine until line above, and then said you thought the Pi had rebooted. I see 3 seconds - I don't think Pi reboots that quickly. Also, you have messages that "no MTA installed"... I guess you know that you're missing the MTA? – Seamus Jul 01 '18 at 22:22
  • @Seamus they are all from the same file /var/log/syslog. I just split them by day – Guilherme Jul 01 '18 at 22:23
  • Best guess based on your Update: Heat-related problem. Have you tried not running the speed tests? Does that make any difference? Also, during the reboot, it seems things were going OK ... did it fail to reboot? – Seamus Jul 01 '18 at 22:42
  • @Seamus the forced reboot at 1:43 was OK. The speed test scheduled for 2:00 worked as expected. Then at 2:17, the system hung again... I too think that temperature is likely to be the top reason, bu two things still bug me: why does it happen consistently at ~ 2:17 AM, and what exactly is causing the system to overheat – Guilherme Jul 01 '18 at 22:57
  • Also, I'm using a pair of heat-sinks that came with the kit I bought – Guilherme Jul 01 '18 at 22:58
  • Maybe "speed tests"? That sounds stressful. Your log shows that you run them each hour. But at this point, we're trying to eliminate variables. "Speed Test" sounds like one to try eliminating. – Seamus Jul 01 '18 at 23:14
  • I will disable it just to make sure, but it definitely shouldn't be "stressful". I used to run it in the old Pi 2 without any problems. Here's the code of the script: https://github.com/guilhermearaujo/ISPMonitor – Guilherme Jul 01 '18 at 23:39
  • Gotta' start somewhere. What are your thoughts? Maybe you should try @Ingo's suggestions in this post. Read through it all, then you can decide which way to go. – Seamus Jul 01 '18 at 23:56
  • @Seamus check my "update 2". Plex seems to be the culprit. – Guilherme Jul 07 '18 at 16:52
  • Good detective work, and a key discovery it would seem - congratulations! I don't know diddly about Plex, but someone else here might. In any event, your idea to try one of the Plex forums is clearly a good decision. You're not transcoding your videos are you? – Seamus Jul 07 '18 at 17:45
  • No, I use Direct Play instead, and let my TV do the work – Guilherme Jul 07 '18 at 21:42

0 Answers0