I’ve been working on a remote weather station project but after dealing with some problems communicating consistently with the weather station hardware I ran into a problem with the Raspberry Pi crashing or locking up fairly often. Sometimes multiple times a day, sometimes every couple of days. as you can imagine this started to drive me nuts so I spent some more time last weekend troubleshooting it.
The weather station uses a GSM modem to send the weather data back to the web server and also provide SSH access via a VPN connection, the only time I use the Ethernet port is when I have to plug the laptop into the Pi, which is usually right after a crash or lockup. Since I was able to get the VPN connection going I decided to try disabling the Raspberry Pi’s Ethernet adapter (don’t need it, right?) so when I was done making software changes on the Pi I just typed in ‘if-down eth0’ and the system has been running stable ever since.
I think this makes a bit more sense to me. When I had the system at home and was setting it up and testing it, I never had any problems with crashes or lockups, but the Pi was also connected to an Ethernet switch the whole time. And when I was at the installation location and had the laptop plugged in, it would happily run for hours on end with no issues present. The lockups only seemed to happen when I didn’t have the laptop plugged in and my initial response to that was ‘Oh great, of course it crashes once I put the laptop away!’
I’ll keep an eye on things and see how stable it remains, but right now it’s looking pretty good, and I guess perhaps the Raspberry Pi has a flaky Ethernet port which doesn’t work right when it’s not connected but an available interface, or the fact that it’s not connected but available is causing something else to lock the Pi solid, though I’ve never seen this problem with any other type of *nix system.