I wrote an extended Python program to control an aquaponic system with a Raspberry Pi (explanation in readme.md).
Since some weeks, the program freezes after some hours. When starting, the CPU-percentage of Python3 is 7-8 %, Memory = 3-4%. After freezing Python3 uses 100% of CPU (according to top). The Raspberry Pi doesn't freez, only the program. I tried to find the cause with psutil. The Python-Shell (which prints the psutil attrs) shows CPU 7.6% and memory 3.4% over houres, then it freezes.
Is there a way to find the cause of freezing with psutil or another sys-module?
I pondered, whether the repeated import commands in submodules (which are invoked during the mainloop) could be the trigger. But the documentation of "import" states that no module is imported again, when it is already in memory.