Raspbian Crashes


11 posts
by ddelux » Sun Dec 30, 2012 6:41 am
Hey all,

I have been experiencing periodic crashes on my new rapsberry pi. As I am trying to use this devise as a server, I would like avoid resetting the power once every day or so. What are some things (like programs) that affect the stability of the OS? The packages I have installed are ssh, the default system tools, apache2, and the apache2 svn.

Also, what packages or tools do people recommend for debugging these type of server stability issues?
Posts: 7
Joined: Sun Dec 30, 2012 6:35 am
by Cloudcentric » Sun Dec 30, 2012 9:02 am
What power supply are you using 5v 1A or greater ?
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by ddelux » Mon Dec 31, 2012 6:48 am
Yes, I am using a Xentris charger that supports up to 2A. When it crashes, only the red power LED remains on. All the other lights are off. Below is the link to the charger.

http://www.amazon.com/Xentris-2-Amp-Mic ... sb+charger
Posts: 7
Joined: Sun Dec 30, 2012 6:35 am
by malakai » Mon Dec 31, 2012 6:53 am
is it hooked up to a screen. can you ping it when it crashes or ssh in. It is possible the server is flooding traffic you could try a lightweight server I forget all the choices in this range at the moment check log files is an option. Here is a link that explain them some http://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by ddelux » Mon Dec 31, 2012 8:14 am
This server is for personal use only and is on a private network. I'm the only one who is accessing the http server. I checked out memory status on system and it's only using 100mb of the ~500mb available. I have it hooked up to monitor and when it crashes, it just goes completely dark. No ssh, no display; the act light on the board doesn't flicker periodically like it normally does. I just reinstalled the os from scratch and it went dark twice during the installation (requiring another power reset).
Posts: 7
Joined: Sun Dec 30, 2012 6:35 am
by MaxK1 » Mon Dec 31, 2012 9:05 am
You have something else going on... take a look at your logs and/or have a look at the troubleshooting
section.

Assuming it's not the screensaver :lol:
Posts: 468
Joined: Sun Aug 26, 2012 11:34 pm
by ddelux » Mon Dec 31, 2012 7:28 pm
Update: My raspberry pi lasted through the night without crashing but it has no software (no apache2, no svn) on it. I compared the logs from before I reinstalled os to after and they look the same. They just show boot information. I read the logs over in detail and from what I can see, they weren't reporting any errors
Posts: 7
Joined: Sun Dec 30, 2012 6:35 am
by unclejed613 » Tue Jan 01, 2013 1:47 am
i had a problem installing raspbian on my pi at first. i downloaded the image and uncompressed it. the thing was, the hard drive i decompressed it onto had 1.3G of space left, and the img file was supposed to be 1.8G... so when i dd'ed it to the SD card, everything seemed to be working fine, but i wasn't able to do the debian update, or set the keyboard codeset, or get it to boot into X after setting that option in the setup. it was quite a while of tinkering before i figured out "gee, there's a lot of broken stuff in this system, maybe i should download another copy and reinstall. i even double-checked the compressed file's md5 hash to make sure it WAS correct, which it was. when i went to download another copy, firefox didn't complain, but didn't download the file either. so i tried to wget it, and that's what told me "the target drive is full". so i spent a while moving files off the disk, deleted the 1.3Gb img file, re-extracted the 1.8Gb img file and reinstalled it.. so that was my experience with a buggy pi. right now i have apache2, mysql, php, TOR, torchat, and an XMPP chat server loaded and running on it, among other things, and it's been cooking along for a week now. i noticed what appears as a memory leak when you run certain programs, but it seems to drop cache space back to the system whenever it needs to. i've also noticed with all of this stuff running, it occasionally uses a little bit of swap space. i suppose you could run
Code: Select all
sudo sysctl vm.drop_caches
as a cron job every 6 or 12 hours to keep memory usage squared away.
Posts: 53
Joined: Sun Jan 15, 2012 10:49 pm
by jojopi » Tue Jan 01, 2013 2:43 am
unclejed613 wrote:sudo sysctl vm.drop_caches as a cron job every 6 or 12 hours
Throwing away perfectly good caches will hurt performance and do little to decrease swapping.

In the Foundation's Raspbian images, vm.swappiness is set to 1 (out of 100, compared to the Linux default of 60). That means that the kernel greatly prefers to discard clean pages rather than swap dirty pages out.

In this example, we allocate 380MiB in one go, and the system happily drops 350MiB of caches to avoid swapping:
Code: Select all
pi@delta ~ $ free
             total       used       free     shared    buffers     cached
Mem:        448996     436004      12992          0      28528     349988
-/+ buffers/cache:      57488     391508
Swap:       102396          0     102396
pi@delta ~ $ sudo memtester 380M
...
got  380MB (398458880 bytes), trying mlock ...locked.^C
pi@delta ~ $ free
             total       used       free     shared    buffers     cached
Mem:        448996      51312     397684          0      14056       5720
-/+ buffers/cache:      31536     417460
Swap:       102396          0     102396
User avatar
Posts: 1966
Joined: Tue Oct 11, 2011 8:38 pm
by unclejed613 » Tue Jan 01, 2013 8:38 pm
thanks, i didn't know that... would that explain some minor "glitches" i've observed, such as mounted DLNA shares (using djmount) that have filenames missing from subdirectories after a period of time (and after doing the vm.drop_caches)? i'm guessing the filenames in the subdirectories are cached, and when i drop the caches, many filenames disappear?
Posts: 53
Joined: Sun Jan 15, 2012 10:49 pm
by TKD Guy » Tue Jan 01, 2013 8:46 pm
Not to be MOTO, but is it overclocked?
Posts: 4
Joined: Fri Dec 28, 2012 7:30 pm