Now I realize this could be something underlying in SPI, but let me explain.
Using piface-api in a usleep loop to read the values of the various digital ins. I've noticed in dmesg that my code results in an OOM error and is killed. Investigating this code further, I'm basically looping a shutdown condition that then runs a foreach on each pin obtained from getInputPins();
If I comment out the getValue line, memory use remains static, no measurable increase on peak consumption.
Do you have any advice or recommendations on this? I have basically had to wrap the aforementioned script in a bash script to relaunch it when it OOMs, which is kinda ghetto.
Now I realize this could be something underlying in SPI, but let me explain.
Using piface-api in a usleep loop to read the values of the various digital ins. I've noticed in dmesg that my code results in an OOM error and is killed. Investigating this code further, I'm basically looping a shutdown condition that then runs a foreach on each pin obtained from getInputPins();
If I comment out the getValue line, memory use remains static, no measurable increase on peak consumption.
Code can be seen in https://github.com/primerpop/php-piMind/blob/master/sensors/piface-spi.php within method realtime() near about line 120.
Do you have any advice or recommendations on this? I have basically had to wrap the aforementioned script in a bash script to relaunch it when it OOMs, which is kinda ghetto.
TIA