3

I've configured my Pi to be an audio streaming box; it starts playing automatically on boot.

After a while, the network seems to go down and I can't ssh or ping the Pi. However, it is still playing the internet stream, so networking is obviously still working but it cannot be reached by other computers.

What could be going on?

  • 1
    Try leaving an ssh connection open the whole time; which unfortunately means having a computer on and not suspended (but if you have a mobile device that runs JuiceSSH, juice will maintain the connection indefinitely while "sleeping"; I've walked away from an android tablet and 12 hours later the ssh session to the pi is still fine). This way you will either get some kind of error at this end and/or an error in the pi logs when and if it disconnects. If it doesn't, but you suddenly can't create a new connection, you'll have the existing connection to try some diagnostics with. – goldilocks Mar 23 '13 at 13:20
  • I am also having some networking problems. I currently have a tail -f /var/log/messages running on the Pi all the time. You can do this with an attached display. I only habe Wifi problems. So I use the Ethernet to debug and use tmux to keep the log open. – Arne Mar 24 '13 at 0:01
  • 1
    You haven't mentioned how your Pi is connecting to said internet. Wireless? What hardware type? Wired? I had a problem with losing connections to my Pi, turned off the power saving options for the RealTek wireless chipset in my usb dongle and it's worked flawlessly since. Basically, it sees no traffic for a bit so it turns off. Disabling this 'feature' fixed this issue for me. – lornix May 3 '13 at 5:48
  • When you say connect, do you use IP or DNS Host name? When this happens run the NetworkScanner tool, or check you router for the current IP of the CONNECTED device. Try to connect or ping the IP. I suspect its a DNS problem – Piotr Kula Jun 4 '14 at 12:35
2

It seems that some versions of the Raspberry Pi tend to hang on high network load.

I solved the problems I had with mine by updating the firmware and allocating more memory for the USB driver.

In order to update the firmware, use rpi-update:

sudo apt-get install rpi-update
sudo rpi-update

And to change the amount of memory that the kernel will keep free, so it can be used by the USB driver for buffering. You should find this value in /etc/sysctl.conf:

vm.min_free_kbytes = 8192

Set it up to: 16384.

More info:

https://github.com/Hexxeh/rpi-update

http://elinux.org/R-Pi_Troubleshooting#Crashes_occur_with_high_network_load

  • 1
    Technically vm.min_free_kbytes = 8192 is not about allocating memory to the USB driver. This is about the kernel ensuring that you have a minimum of amount of free system memory, which the USB driver can take advantage of if necessary for buffering. (vm = virtual memory, see kernel.org/doc/Documentation/sysctl/vm.txt) – Fred Apr 5 '14 at 9:50
0

Maybe, and I don't use that maybe lightly. There could be a short lease on your DHCP addressing, and the ip address changes and you no longer have a valid address? Maybe try a cronjob

crontab -e

0-59 * * * * [maybe your user account] ifconfig -a >> $HOME/my_ip.txt

I say maybe on the user account part because when I did it that way on a system, it didn't work for me, even though some pictures on google when typing cronjob said to. Also I'm only kinda sure putting a dash works, as I haven't tried it. Another option is 0,15,30,45 as replacing the 0-59 argument. This will be less to look through, although all you will need is the tail of the file to see if this might be the problem.

  • DHCP shouldn't be the problem as I have a DHCP reservation set in my router for the Pi (ie. no expiration on DHCP reservations). – tavis Apr 1 '13 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.