This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Script is already running or disabled
#4
(09.10.2017, 12:34)Thomas Wrote: Thank you.
Can I set timeout for ssl operations?
Can I set time limit for script execution?
It's potentially dangerous if a script can hangs in this way.

Hi there !
I've exactly the same problem, my 2 scheduled scripts are hanging every week or so. For now, I manually reboot my LM, but I would like to find the cause of the hang.
My scripts are very simple .. just get some grp value on the bus and report them to emoncms via SSL.  
Here is the code of one of the scripts.
Is there any solution to make them more "resilient" to SSL problems ?
Thanks for any help

PS/ I did not have that problem a few month ago .. so maybe emoncms is getting to busy and slow to answer requests ?

Code:
-- load required modules
require("ssl.https")

local emoncms_url = 'https://emoncms.org/input/post?node=Q350&apikey=############################'

local Q350_airflow = grp.getvalue ('0/2/70')
local Q350_extract_T = grp.getvalue ('0/2/74')
local Q350_exhaust_T = grp.getvalue ('0/2/75')
local Q350_outdoor_T = grp.getvalue ('0/2/76')
local Q350_supply_T = grp.getvalue ('0/2/77')
local Q350_extract_H = grp.getvalue ('0/2/104')
local Q350_exhaust_H = grp.getvalue ('0/2/105')
local Q350_outdoor_H = grp.getvalue ('0/2/106')
local Q350_supply_H = grp.getvalue ('0/2/107')
local Q350_rendement = grp.getvalue ('2/1/1')

local json_data = '&fulljson={%22Q350_airflow%22:' .. Q350_airflow
json_data = json_data .. ',%22Q350_extract_T%22:' .. Q350_extract_T
json_data = json_data .. ',%22Q350_exhaust_T%22:'.. Q350_exhaust_T
json_data = json_data .. ',%22Q350_outdoor_T%22:' .. Q350_outdoor_T
json_data = json_data .. ',%22Q350_supply_T%22:' .. Q350_supply_T
json_data = json_data .. ',%22Q350_extract_H%22:' .. Q350_extract_H
json_data = json_data .. ',%22Q350_exhaust_H%22:' .. Q350_exhaust_H
json_data = json_data .. ',%22Q350_outdoor_H%22:' .. Q350_outdoor_H
json_data = json_data .. ',%22Q350_supply_H%22:' .. Q350_supply_H
json_data = json_data .. ',%22Q350_rendement%22:' .. Q350_rendement
json_data = json_data .. '}'

ssl.https.TIMEOUT = 5
data,err = ssl.https.request(emoncms_url,json_data)
Reply


Messages In This Thread
RE: Script is already running or disabled - by mooselight - 17.02.2018, 17:01

Forum Jump: