3

Ok I came here after hours of useless tries, but I'm quite unfamiliar with linux, so I may be missing something obvious...

My Pi runs latest Raspbian and seems to be correctly setup on my home wifi LAN, everything works (LAN/Internet ping, SSH, various services). I'm also powering the Pi through a powered USB hub.

After a random amount of time (5min to 3hours) the connection just stops working, which means, wicd still says that is connected to the router, with the same IP (and the router detects the Pi as well), but the Pi can't reach or get reached by anything anymore (eg: no ping, no ssh, no internet access).

When this happens I have to manually disconnect & reconnect to the wifi through wicd-curses, but it's a hassle since I'd like to control the Pi through SSH only. Any idea?

4
  • Mine use to freeze for up to 60 seconds or so at random intervals but always recovered. I switched power management off and it solved my problem. Are you back powering the Pi? It may not be getting enough power.
    – joan
    May 3, 2014 at 20:34
  • Thank you for your comment Joan. Yes I'm backpowering the Pi, but my voltage readings are stable at 5.05V, so I don't think that's the issue. What do you mean by "power management switched off"?
    – Johann
    May 4, 2014 at 0:26
  • Type iwconfig. There should be a line like "Power Management:on" (or off). In /etc/network/interfaces add a line "wireless-power off". I think that leaves the wireless using full-power. It cured the problem with the wireless dongle I was using.
    – joan
    May 4, 2014 at 5:01
  • in my case that flag was already off. Anyway the problem disappeared after increasing vm.min_free_kbytes AND starting a bittorrent daemon. I don't know yet if it was the setting, or if the bittorrent acts as a "keepalive" service, I'll do more research when I'll got time.
    – Johann
    May 4, 2014 at 21:47

1 Answer 1

1

After quite a bit of testing, it seems that increasing to 16384 the vm.min_free_kbytes flag in /etc/sysctl.conf did the trick, as stated here:

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

updating all the software and firmware might have helped, altough not directly resolving the issue.

For reference:

#update the raspy
sudo apt-get update
sudo apt-get upgrade    
sudo rpi-update

#edit the flag
sudo nano /etc/sysctl.conf

Find:

vm.min_free_kbytes = 8192

Change to:

vm.min_free_kbytes = 16384

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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