I am new to Stackexchange. I have been working on a monitoring service (python based) on RPi Zero W. I edited the /etc/rc.local file to execute the program during the startup. The program works perfectly for the first 45 - 90 mins of runtime. But after that, HTTP API on the service doesn't respond and it doesn't start accepting any new SSH connections after that time period

These are my findings


RPi is not accepting any new connections (SSH, HTTP) after 45 - 90 mins of runtime


After 45 - 90 mins, I get a sound prompt on PuTTY(Windows) on existing SSH connections to RPi(No error message popup). All the existing SSH connections would work perfectly fine After that sound prompt, cannot create any new SSH connections I hooked up the RPi to a screen to view for any exceptions thrown by the code. But after the prompt, the screen is frozen When I run "top" command in the existing SSH terminal, it shows that the python task is still running

Things I did to fix it

Turned off the power management on WiFi interface

Looked at the syslog and kernel logs, did not find anything regarding that

But nothing worked out for me. Do let me know if you find anything or encountered something similar. Thanks in advance

  • Do you use Raspbian Buster? Please take note that using /etc/rc.local has limitations due to Compatibility with SysV. We have seen many problems here on this site using it. Following the recommendation of the developers from systemd you should avoid using it.
    – Ingo
    Dec 16, 2019 at 1:34
  • thanks for replying. No, I am using Raspbian Jessie. I would implement it as a service and let you know the results Dec 17, 2019 at 15:42

1 Answer 1


Check fd usage see if any files are being opened and not closed properly, have seen that behavior when out of fds. sysctl fs.file-nr

Check netstat as well to see if any connections are aggregating. Monitor top memory and CPU usage prior to the failure and look for anomalies.

  • Thanks for replying. I would look for that behaviour that you have mentioned Dec 17, 2019 at 15:43

Your Answer

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

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