erdose / xiaomi-mi-lywsd03mmc

Xiaomi Mi BLE Temperature & Humidity Sensor
MIT License
26 stars 7 forks source link

Process hangs, system went OOM #7

Closed GertjanBijl closed 3 years ago

GertjanBijl commented 3 years ago

I found my server non-functioning this evening (domoticz, influxdb and grafana were killed), with a bunch of bluepy-helper processes running using a lot of memory and CPU. Apparently the process runs forever without any form of timeout. I now started the process with the following line to include a timeout of 60 seconds and eventually forcefully kill it 10 seconds later. /bin/sh -c cd /opt/xiaomi-mi-lywsd03mmc && timeout -k 10 60 python3 xiaomiBleLywsd03mmc.py

I highly recommend to add a timeout to the script or add the timeout-command to the documentation.

erdose commented 3 years ago

Thank you very much! I updated the documentation.