[SOLVED] Raspberry pi 2 runs fine for a month and then starts freezing more and more
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Raspberry pi 2 runs fine for a month and then starts freezing more and more
I'm running Raspbian Buster Lite, headless on a raspberry pi 2 and this problem actually started around the end of 2019. Every time this start happening I do a fresh install and I'm basically good for a month and then the problem starts again, it starts with freezing once a day but very quickly it’s up to multiple times a day (5-6 times). With freezing I mean I can’t do anything to reach it and my only option is a hard reset.
I included syslog (log is from moment it freezes but seems like logs from starting up) and debug log but have all other logs if needed.
Thanks in advance.
do you really want to run all those things on the rpi2? (mysql, mono, transmission, dhcpd, samba, ...)
I would guess it is out of memory (but would be nice to give more details).
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498
Rep:
SD cards were originally created as storage media, constant reading & writing will wear them out.
If you're not already doing so, boot from SD card, but run your system from an external HDD or SSD.
(& giving it a reasonable allowance of swap space will probably help too).
SD cards were originally created as storage media, constant reading & writing will wear them out.
If you're not already doing so, boot from SD card, but run your system from an external HDD or SSD.
(& giving it a reasonable allowance of swap space will probably help too).
I have been trying this before but wasn't a solution as well. Also, the SD card should be fine, I have been using two new cards since my first ones were worn out. And if I test them they are good. I think pan64 is right and it's time to upgrade, think the things I run on it (especially mono) are getting a bit too much.
do you really want to run all those things on the rpi2? (mysql, mono, transmission, dhcpd, samba, ...)
I would guess it is out of memory (but would be nice to give more details).
It actually have been running fine this way for years, must be 5 years now. But you are probably right, it's probably time to upgrade. Those programs, especially mono, aren't getting any lighter.
I did use a cronjob to check my memory every 5 minutes and the free memory seems low
Code:
total used free shared buff/cache available
Mem: 926 370 37 8 518 492
Swap: 99 7 92
total used free shared buff/cache available
Mem: 926 370 36 8 518 491
Swap: 99 7 92
total used free shared buff/cache available
Mem: 926 370 37 8 518 491
Swap: 99 7 92
total used free shared buff/cache available
Mem: 926 370 37 8 518 492
Swap: 99 7 92
total used free shared buff/cache available
Mem: 926 370 37 8 518 491
Swap: 99 7 92
total used free shared buff/cache available
Mem: 926 40 758 6 127 830
Swap: 99 0 99
total used free shared buff/cache available
Mem: 926 256 378 7 290 611
Swap: 99 0 99
total used free shared buff/cache available
Mem: 926 274 359 7 291 593
Swap: 99 0 99
What benefit is there in disabling swap ?. Especially if re-booting 5 or 6 times a day.
There has to be some logs somewhere. Unless something doesn't want to be seen. When you re-install, do you use the same passwords and security settings ?.
I would switch off swap and also check if there was a disk full somewhere...
What OS is it? How is it partitioned?
Switched off swap and have two partitions on the SD card, a boot and a root partition. They are both not half full. I'm running Raspbian Buster Lite from the raspberry pi website.
What benefit is there in disabling swap ?. Especially if re-booting 5 or 6 times a day.
There has to be some logs somewhere. Unless something doesn't want to be seen. When you re-install, do you use the same passwords and security settings ?.
Got nothing to hide, what logs could come in handy? I do usually generate a new password when I do a fresh install, root login disabled.
No, I wasn't aspersing you - I was wondering if you had been hacked by something like a bitcoin miner say. Some of the good ones will attempt to cover their presence, although removal of logs is pretty drastic.
My thought was if you used the same passwords you might be (more) subject to being re-attacked.
I've never used Debian - does it forward the systemd journal to rsyslog ?.
No, I wasn't aspersing you - I was wondering if you had been hacked by something like a bitcoin miner say. Some of the good ones will attempt to cover their presence, although removal of logs is pretty drastic.
My thought was if you used the same passwords you might be (more) subject to being re-attacked.
Haha, ok I see. Wouldn't this be a bit over the top for the bit of power they could get from my device?
Quote:
Originally Posted by syg00
I've never used Debian - does it forward the systemd journal to rsyslog ?.
It isn't but I enabled ForwardToSyslog=yes in /etc/systemd/journald.conf
Wouldn't this be a bit over the top for the bit of power they could get from my device?
"They" is probably an automated script somewhere that just tries to get in wherever possible. It probably doesn't even know how capable your machine is and doesn't care if it occasionally kills a host.
But I think it more likely that your raspi2 is a bit overloaded with mysql, mono, transmission, dhcpd, samba...
"They" is probably an automated script somewhere that just tries to get in wherever possible. It probably doesn't even know how capable your machine is and doesn't care if it occasionally kills a host.
Good point
Quote:
Originally Posted by ondoho
But I think it more likely that your raspi2 is a bit overloaded with mysql, mono, transmission, dhcpd, samba...
Yes, was afraid of that. Well, I shouldn't complain, five years running 24/7 for €40 seems a good deal. Guess it's finally time to update to a raspi4
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.