Sending periodic http requests lets Openhab crash


I am using Openhabian based on Openhab3. To periodically display a temperature value I set up a schedule that sends a json structure every minute:

val String URL = "http://openhab:7000/api/v3/notify"
var String contenttype = "application/json"

var String jsondata = '{"force":true,"text":"'+egTemperaturVorgarten.state+'°C","icon":234,"color":[0,255,255],"repeat":1}'

sendHttpPostRequest(URL, contenttype, jsondata)

The script works as expected. But after about a day of operation Openhab gets instable. I already had to reboot the system several times. On 2 days Openhab lost its configuration and i needed to restore all items.

The log showed an error message related to Java stack overflow, but forgot to copy. It looks to me as if the huge amount of http requests fill up the stack.

Am I doing something wrong in the way I use the http request?

Thanks for your support.


That’s the sendHttpPostRequest http action ? I would add a timeout. Not sure if some of the action calls could run forever in case of a problem and no timeout is added - then they may eat up all the memory.

Hi Wolfgang,
thanks for your reply and sorry for the delay. I needed to do some testing.
Adding a timeout did not solve the problem straight away.
I needed to re-install the host application of the second application running on the same raspi AWTRIX.
Both, Openhab and Awtrix use Java. I guess there was some interference.

Thanks again and best regards,