I am having recurring problems with 2 Pi0W and, less often, with a Pi3B+ using pikrellcam as part of wildlife project
What happens is that the Pi simply freezes. I am using a headless mode and cannot connect with SSH or pikrelcam web-GUI. On some occasions the pi has stopped halfway through a recording or conversion from H264 to mp4 video. It happens randomly, ranging from minutes to days from boot.
Setup is with latest stretch as-per current date. I have ruled out PSU issues, bad cables and corrupted SD-cards. I have turned off wifi powermanagement (though I have read this i off by default in Stretch) Current IW signal strenght for Pi0Ws are -64 dbm and link-quality is 46/70 I have an USB microphone attached but nothing else.
Question: Is it normal that Pi freezes when wifi is lost or the link is too bad? (Pikrell cam and NFNIX server should not be affected by the wifi connection and should not affect the pi in that way)
Funny thing is that I set up the same Pi on another router and it ran for weeks. So I tried a new router instead of the one I am currenly using for my wildflife project, but still the Pis freeze. Is there some external factor I have missed? Freak magnetic fields? Angry spirits?
EDIT: I had previously set both Pi0 to overvoltage=4 but on a recommendation I set one of them to 8. It still froze today. I have one a new mesh network and one on my old (8 years old) router and they have boot frozen at some point the past few days. I tried checking the logs (/var/log/syslog, messages, etc) but found only the usual startup messages and then nothing until i had to reboot again. Nothing unusual around the time of the freeze
Secondary question: Can someone point me towards a script that will monitor voltage (or lack therof) and wifi connection?
EDIT 2: The problem appears to be random and I have not been able to replicate it at will. Just for claritys sake I will write a brief timeline of all different things I have tried.
- Standard setup as above, though it was an older version of stretch (2018). The Pi0 would freeze randomly.
- I changed the PSU and cables to all RPI-PSU and thick Anker-cables. I added over_voltage=4 and force_turbo=1 (from recommendation in this post https://www.raspberrypi.org/forums/viewtopic.php?t=212777).
- I set up 2 Pi0 in my office, all else the same, and they both ran for weeks.
- I moved the Pi's to the test area (old guesthouse/shed at the bottom of my garden) and added my old router to wpa_supplicant. Had problems with the Pi's freezing from day one.
- Set up one Pi on a fresh SD card. Used GUI to set it up on my old router. - Still frooze, anything from minutes to days from boot.
- Set up the other Pi to use my phone's mobile hotspot. It frooze a few hours after I turned off the hotspot. I have now returned it to my old router.
- Changed over_voltage=8 as recommended in this post https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=115583&p=1469947#p1469770. Still froze.
- Added one of the Pi0 to my mesh network (Moved a satellite to the test area). It has frozen once but not since. So still a bit inconclusive.
Since the problem appears at very random times it is difficult to find a exact circumstance when it appears. - It could be the wifi in the test area, either I have missed a setting in the setup or on the router. This is supported by the fact that 2 Pi0s ran for weeks in my office. But why would one pi freeze and the other continue working for days when I have the same setup on both?
- It could be a power setting, I feel I have ruled out PSU/cable issues, though I thought I had found the solution with over_voltage=4. The Pi's both ran for weeks in my office. It is slightly supported by the fact that the freezing often seem to happen halfway through a video conversion. But if so, Why? Could it be that the CPU is overwhelmed when trying to deal with motion detection and video recording at the same time, but if so, why does it only happen occasionally?
I the next few days I will try to change the SD cards to new ones and see what happens.
I will also try to move one of the Pi0 to a new place just in case I am having som freak magnetic fields screwing with me in the test area (see answer in this post: Raspberry Pi 3B+ freezes randomly )
I tried checking the logs (syslog, msglog, etc) but found only the usual startup messages and then nothing until i had to reboot again. Nothing unusual around the time of the freeze Is there anywhere else I should look?
If you could point me in the right direction for system monitoring scripts I would be grateful.
– Carl-Fredrik von Essen Jun 01 '19 at 19:41