I've read a lot of post dealing with raspberry boot problems. My case is slightly different.

I've bought a raspberry pi some months ago, just for trying it and learn a little bit of python, I've tried to make an alarm clock using one of the breadboard kit that can be found online.

Since I need it to work as an alarm clock, I never power it off, nor interact with the system during the day. Randomly, generally every 3-4 days it gets stuck. If I connect a keyboard it doesn't responde, black screen, and cannot ssh into the system.

I've even bought a new 64GB sd card, thinking it could be the problem, but things are not changed.

Is there some raspberry functionality for which it goes idle after a given time of inactivity or something like this? Any ideas on how to solve this?


  • Are you using GUI. Add details of your Raspberry Pi Model and configuration. Look at the output of top command and see which process has maximum cpu utilization. Only then stack community can help you. – Varad A G Sep 10 '16 at 8:57
  • "Is there some raspberry functionality for which it goes idle after a given time of inactivity or something like this?" -> No. – goldilocks Sep 10 '16 at 11:26
  • Can you reduce the code to the simplest case that fails, and post that? ...or even just post your code? – Patrick Pribyl Sep 12 '16 at 1:07

I have several Pi, some of which run continuously for months at a time - even then only restart when I need to make some changes.

It is thus possible for the Pi to run without interruption. Obviously a power interruption will interrupt any running program, but the Pi itself should restart.

The first step is to ensure you have a reliable power supply, and using a good quality SD Card helps.

If you want to run an application which needs to run continuously (on the Pi or any other computer) you need to take measures to recover from the problems which can occur on any system.

The traditional approach is a watchdog. This can be dedicated hardware or in software. Raspbian has a watchdog which can be activated to detect problems and restart.

| improve this answer | |

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.