LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-10-2020, 09:16 PM   #1
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Rep: Reputation: Disabled
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.
 
Old 05-11-2020, 02:56 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,867

Rep: Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313
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).
 
Old 05-11-2020, 05:04 AM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,498

Rep: Reputation: Disabled
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).
 
Old 05-11-2020, 06:03 AM   #4
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
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.
 
Old 05-11-2020, 06:10 AM   #5
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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
Last three are from after rebooting.
 
Old 05-11-2020, 06:31 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,867

Rep: Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313
I would switch off swap and also check if there was a disk full somewhere...
What OS is it? How is it partitioned?
 
Old 05-11-2020, 06:46 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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 ?.
 
Old 05-11-2020, 06:52 AM   #8
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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.
 
Old 05-11-2020, 06:58 AM   #9
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
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.
 
Old 05-11-2020, 07:02 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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 ?.
 
Old 05-11-2020, 07:20 AM   #11
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
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 View Post
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
 
Old 05-11-2020, 02:59 PM   #12
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I've never used Debian - does it forward the systemd journal to rsyslog ?.
These are the logs of my latest freeze, now they include the systemd journal.
Turning the swap memory to zero didn't work.
 
Old 05-12-2020, 12:18 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by yveske View Post
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...
 
Old 05-12-2020, 02:20 AM   #14
yveske
LQ Newbie
 
Registered: Apr 2018
Location: Ekeren
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
"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 View Post
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

Thanks everyone for their time.
 
Old 05-12-2020, 02:44 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,867

Rep: Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313Reputation: 7313
you can still use pi2 (actually I run pihole on it).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] systemd unit file starts and runs fine manually but not on bootup taylorkh Linux - General 11 01-06-2019 06:08 PM
Get first day of last month and last day of last month in bash xowl Linux - Software 18 02-09-2017 09:49 AM
Mandriva 2009 starts installation and then monitor starts rolling showing color lines HubertHickey Linux - Newbie 6 12-18-2008 12:24 AM
webcam color starts fine, then goes crappy... jeffreybluml Linux - Newbie 0 01-01-2005 02:14 PM
Starting day of month, month length chrisk5527 Programming 2 03-03-2004 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration