Timeout errors

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Timeout errors

Post by EddyG »

Version: 3.8153
Platform: Linux domoticz 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux update to the lastest Debian version
Plugin/Hardware: Raspberry Pi 3 with RFXCOM, RazBerry, etc....

I do not like ERRORS!!!

I have a Slave with a P1 meter, which updates approx. every 10 seconds
Those electricity readings are send to my master Raspberry Pi 3.
I have Solar panels so I use a dzVents script to get the real Usage in a dummy.
That script runs at the same pace as the data comes from the Slave.
I have a lot of other scripts that run every minute or every 5 minutes.
It looks like that on some occasions when all those scripts run after each other and data comes from the save and the 'usage' script is run at the same time I get timeout errors, like this:
2017-11-15 14:04:20.067 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
Normally all those scripts run in less than 1 or 2 seconds, depending on the number of scripts running.
It would be nice to have to have more info on the cause of the error.
It would be nice to have a way to prevent those errors.

Anyone, any idea(s)???
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Timeout errors

Post by BakSeeDaa »

Well, do you have a script that is dependent on the reply of an external server? E.g. you make a system call in your script to "curl" and force Domoticz to hold and wait for the response of that external server?
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Timeout errors

Post by EddyG »

I changed all my scripts to the asynchrone methode you described in an other script.
Only one script is left to post data to PVoutput.org on a synchrone way.
That script is running on every change in usage data, so almost every 10 seconds.
Put the post of the data to PVoutput.org is done every 5 minutes.
The errors are mostly not at the same time as the post is done, so it should be something else.
It looks like that sometimes the error is present when in the middle of processing the dzVents scripts the usage script is called, then sometimes (not always) the timeout error occurs.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Timeout errors

Post by BakSeeDaa »

EddyG wrote: Thursday 16 November 2017 12:33 I changed all my scripts to the asynchrone methode you described in an other script.
Only one script is left to post data to PVoutput.org on a synchrone way.
That script is running on every change in usage data, so almost every 10 seconds.
Put the post of the data to PVoutput.org is done every 5 minutes.
The errors are mostly not at the same time as the post is done, so it should be something else.
It looks like that sometimes the error is present when in the middle of processing the dzVents scripts the usage script is called, then sometimes (not always) the timeout error occurs.
If so, I cant say. But you can try to disable all your scripts to see if the problem disappears. If it does, then try to enable your scripts again but do it one by one allowing enough time to spot when the problem reappears.That's what I would do.
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

Re: Timeout errors

Post by Freemann »

I'm also seeing these "errors";

Code: Select all

2017-11-17 10:00:10.345 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
No idea what's causing it, not speaking about how to solve it.
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

Re: Timeout errors

Post by Freemann »

Code: Select all

2017-11-25 02:10:10.509 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 02:30:10.235 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 02:40:10.347 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 02:50:10.464 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 03:10:10.184 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 03:20:10.291 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 04:10:10.346 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 04:30:10.085 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 04:40:10.207 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
2017-11-25 05:00:10.426 Error: EventSystem: Warning!, lua script /home/pi/dev-domoticz/dzVents/runtime/dzVents.lua has been running for more than 10 seconds
Still seeying "tons" of these messages.
Have no "every 10 minutes" job running, so the 10 min interval is an "coincidence" ?!
Have a lot of jobs which run every 1,2,5 minutes, so its "almost" impossible to debug.

Any ideas how to debug this?
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Timeout errors

Post by BakSeeDaa »

Freemann wrote: Saturday 25 November 2017 19:31 ...
Still seeying "tons" of these messages.
Have no "every 10 minutes" job running, so the 10 min interval is an "coincidence" ?!
Have a lot of jobs which run every 1,2,5 minutes, so its "almost" impossible to debug.

Any ideas how to debug this?
Doesn't the debug strategy that i proposed for @EddyG above also work for you?
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

Re: Timeout errors

Post by Freemann »

Have 45+ active Lua/dzVents scripts.
So its possible, but will do a lot of pain (very low WAF).

Will leave it for now and wait on the new ASync options.
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest