Seaside
(Seaside)
February 4, 2019, 7:32pm
1
Hi!
After updating openhab to 2.5.0 I’m getting problems with running out of threads for ruleEngine.
I have set:
org.eclipse.smarthome.threadpool:ruleEngine=20 in runtime.cfg
Looking in karaf I see the following:
penhab> shell:threads --list |grep -i “ruleEngine”
220 │ ESH-ruleEngine-1 │ TIMED_WAITING │ 847 │ 840
221 │ ESH-ruleEngine-2 │ TIMED_WAITING │ 23444 │ 23420
255 │ ESH-ruleEngine-3 │ TIMED_WAITING │ 10073 │ 10010
257 │ ESH-ruleEngine-4 │ TIMED_WAITING │ 898 │ 890
258 │ ESH-ruleEngine-5 │ TIMED_WAITING │ 2791 │ 2760
352 │ pipe-grep -i “ruleEngine” │ RUNNABLE │ 276 │ 240
Indicating no more than 5 threads (default) are used.
penhab> config:list “(service.pid=org.eclipse.smarthome.threadpool)”
Pid: org.eclipse.smarthome.threadpool
BundleLocation: null
Properties:
RuleEngine = 20
discovery = 5
safeCall = 10
service.pid = org.eclipse.smarthome.threadpool
thingHandler = 5
Anyone know if this parameter has changed somehow? I actually don’t have any Sleeps in my rules, but I do have a lot of things going on and I need more than 5 threads for it to work.
Using Openhabian and a Rpi3b.
Regards, S
mhilbush
(Mark)
February 4, 2019, 8:17pm
2
Are you using the parameter RuleEngine
or ruleEngine
? You said you are setting it to ruleEngine
, but the config:list is showing RuleEngine
.
Some time back it changed to ruleEngine
.
My config:list shows this:
openhab> config:list "(service.pid=org.eclipse.smarthome.threadpool)"
----------------------------------------------------------------
Pid: org.eclipse.smarthome.threadpool
BundleLocation: null
Properties:
discovery = 6
ruleEngine = 30
safeCall = 12
service.pid = org.eclipse.smarthome.threadpool
thingHandler = 10
Seaside
(Seaside)
February 4, 2019, 8:38pm
3
I actually set both, but I have removed the one with capital R.
So:
I set:
org.eclipse.smarthome.threadpool:ruleEngine=20
But config:list displays:
Pid: org.eclipse.smarthome.threadpool
BundleLocation: null
Properties:
RuleEngine = 20
discovery = 5
safeCall = 10
service.pid = org.eclipse.smarthome.threadpool
thingHandler = 5
Changing the parameter is reflected in the value.
mhilbush
(Mark)
February 4, 2019, 8:45pm
4
What’s in userdata/config/org/eclipse/smarthome/threadpool.config
?
This?
ruleEngine="20"
Or this?
RuleEngine="20"
Or both?
Seaside
(Seaside)
February 4, 2019, 8:57pm
5
RuleEngine=“20”
I guess this is the problem, just change it?
Regards, S
mhilbush
(Mark)
February 4, 2019, 9:00pm
6
When I get bit by the shadow config bug, I usually stop openHAB, make the change, then start openHAB.
I’m a little surprised that if you set org.eclipse.smarthome.threadpool:ruleEngine=20
in services/runtime.cfg, it’s not in threadpool.config
, too.
Nevertheless, changing threadpool.config
should fix the problem.
2 Likes
Seaside
(Seaside)
February 4, 2019, 9:01pm
7
Thanks! That did work, I’ve done plenty restarts, but uppercase was still in use.
openhab> shell:threads --list |grep -i “ruleEngine”
93 │ pipe-grep -i “ruleEngine” │ RUNNABLE │ 1641 │ 1490
134 │ ESH-ruleEngine-1 │ RUNNABLE │ 3322 │ 3310
176 │ ESH-ruleEngine-2 │ TIMED_WAITING │ 1166 │ 1130
178 │ ESH-ruleEngine-3 │ TIMED_WAITING │ 0 │ 0
234 │ ESH-ruleEngine-4 │ TIMED_WAITING │ 1 │ 0
246 │ ESH-ruleEngine-5 │ BLOCKED │ 1 │ 0
251 │ ESH-ruleEngine-6 │ TIMED_WAITING │ 0 │ 0
254 │ ESH-ruleEngine-7 │ TIMED_WAITING │ 0 │ 0
268 │ ESH-ruleEngine-8 │ TIMED_WAITING │ 0 │ 0
1 Like
mhilbush
(Mark)
February 4, 2019, 9:06pm
8
The shadow config is a bit wonky. If you delete something in a .cfg file, the deletion doesn’t automatically propagate to the shadow config file. Burned me really badly once with the gcal binding – literally spent hours trying to track down why something wasn’t working.