All plugings ending unexpectedly at the same time

Python and python framework
Post Reply
User avatar
heggink
Posts: 598
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V4.9999
Location: NL
Contact:

All plugings ending unexpectedly at the same time

Post by heggink » Wednesday 12 September 2018 18:58

Anyone seen something like this? Little snippet from the log:

2018-09-12 16:33:11.426 Error: Life360 hardware (59) thread seems to have ended unexpectedly
2018-09-12 16:33:11.427 Error: PW UPS hardware (63) thread seems to have ended unexpectedly
2018-09-12 16:33:11.427 Error: z-wave Batteries hardware (64) thread seems to have ended unexpectedly
2018-09-12 16:33:11.428 Error: MAC Rosa hardware (69) thread seems to have ended unexpectedly
2018-09-12 16:33:11.428 Error: MAC Dolores hardware (70) thread seems to have ended unexpectedly
2018-09-12 16:33:11.428 Error: MAC Karin hardware (71) thread seems to have ended unexpectedly
2018-09-12 16:33:11.428 Error: MAC Herman hardware (72) thread seems to have ended unexpectedly
2018-09-12 16:33:11.429 Error: MAC Guest hardware (73) thread seems to have ended unexpectedly
2018-09-12 16:33:11.429 Error: BTH Herman2 hardware (74) thread seems to have ended unexpectedly
2018-09-12 16:33:11.430 Error: BTH Karin2 hardware (75) thread seems to have ended unexpectedly
2018-09-12 16:33:11.430 Error: BTH Guest2 hardware (76) thread seems to have ended unexpectedly
2018-09-12 16:33:11.430 Error: APL Dolly hardware (77) thread seems to have ended unexpectedly
2018-09-12 16:33:11.431 Error: APL Karin hardware (78) thread seems to have ended unexpectedly
2018-09-12 16:33:11.431 Error: APL Rosa hardware (79) thread seems to have ended unexpectedly
2018-09-12 16:33:11.431 Error: B1 hardware (80) thread seems to have ended unexpectedly
2018-09-12 16:33:11.431 Error: B2 hardware (81) thread seems to have ended unexpectedly
2018-09-12 16:33:11.432 Error: Buienradar hardware (66) thread seems to have ended unexpectedly
2018-09-12 16:33:25.450 Error: Life360 hardware (59) thread seems to have ended unexpectedly
2018-09-12 16:33:25.450 Error: PW UPS hardware (63) thread seems to have ended unexpectedly
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

l00pz
Posts: 56
Joined: Wednesday 01 April 2015 11:52
Target OS: Linux
Domoticz version: Beta
Contact:

Re: All plugings ending unexpectedly at the same time

Post by l00pz » Thursday 13 September 2018 15:24

Hmmm I guess I got the same issue, all of my Python Plug-ins end at the same time. I'm using the Denon, Life360 and Xiaomi Mi Robot Plug-in, so maybe it has something to do with the Life360 Plug-in as thats a Plug-in we both use. The last crash I had was at 07:00 this morning, did you also have a crash at that time?

User avatar
heggink
Posts: 598
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V4.9999
Location: NL
Contact:

Re: All plugings ending unexpectedly at the same time

Post by heggink » Thursday 13 September 2018 16:12

Unfortunately not. Also, since a reboot, I am still seeing these messages (they are not really crashes but unresponsive plugins at that moment in time) but less and from fewer plugins (eg no life360). I suspect something is holding up the python subsystem causing some timeout within domoticz. Sent dnpwwo a pm...
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

User avatar
heggink
Posts: 598
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V4.9999
Location: NL
Contact:

Re: All plugings ending unexpectedly at the same time

Post by heggink » Monday 17 September 2018 22:48

I an testing a theory which goes as follows: using the buienradar plugin, I noticed it was using a domoticz.heartbeat(30) whereas dnpwwo indicates that a value above 10 may cause this domoticz error message. When I changed it to 10 those were gone and I also saw less from the others.

I suspect (but may be wrong) that, whenever a heartbeat processing takes too much time (ie does not return control fast enough), domoticz may think it has ended (although it will still run, it's only an error message).

I use a number of plugins that all retrieve data regularly (and often) from the internet: iCloud (which I created using using the pyicloud library which uses the requests library for http calls: this library is synchronous), life360 which febalci wrote and he reworked into using the urllib library (also synchronous). Then I have my nuki locks plugin (that, for now, uses urllib as well) so you get my point here: the more plugins doing http calls waiting for a response, the higher the likelihood that domoticz complains about them if they are in a wait mode (especially if they happen to do these calls at the same time).

I did not go through the domoticz code to know this to be a fact so hopefully @dnpwwo can shed a light. I also wonder if this is causing my system to be less responsive at times (a sensor triggering a script switching on a light on a zwave plug where the whole cycle usually is sub second but sometimes takes like 5 seconds which is not helpful in the dark).

Anyways, trying to see if I can change some of these plugins to be faster and less 'blocking and see if that speeds things up.

H
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests