Changing RuleEngine thread pool size does not appear to have any affect (always 5) #6289
Comments
I can not reproduce the behaviour you describe. When configuring the
in smarthome.cfg and restart my instance I get the following output for the example you posted in the forum:
Also, thread list looks like this:
I will close here, please reopen with more details when you think there is a bug. |
There's a capital R in RuleEngine but the others are camel case! Was hoping that would help, but after correcting the capitalization and a restart, the thread pool change is still not updating properly on my system (same results as posted in the forum). Currently on snapshot 1374. Hmmm... Another oddity is that the case does not seem to matter... Karaf always shows the change but only 5 rules will run at a time. |
I am 2.3 stable and i also do not see an increased number of threads. Although the configured value now changes. This is after a restart.
Here is a log:
I am restarting again with a 'RuleEngine' property |
Here is now the result with an uppercase 'R'. runtime.cfg
config: the uppercase 'R' property is missing!
the threads
the log:
So, some part of openHAB does not like the uppercase 'R' in RuleEngine. |
@htreu, on what kind of system did you find your results? And how can i reopen this issue? I am running on openHABian with Oracle Java on a Raspberry Pi 3+. Using openHAB 2.3. |
I found a difference, retesting. I was using 'runtime.cfg', @htreu, you are using 'smarthome.cfg'. |
It is smarthome.cfg in the ESH IDE, but runtime.cfg in the openHAB distro. |
@htreu I actually would expect the parameter to be lower case, too. |
Thanks. I also received the same results with smarthome.cfg in my latest test. Threadpool size for RuleEngine is still at 5, property for threadpool size is at 50. (I removed the property from runtime.cfg and added a smarthome.cfg with just that one property.) |
The thread pool in RuleEngineImpl is created like this: Wrt Karaf: Is there a config cache which config admin uses? I will retry with the latest openHAB runtime and see whats happening. |
We should use the chance that it is anyhow not really working and change this to be following the same naming scheme as the other thread pools. |
working for ESH only! But I agree, the pool name feels very wrong. I will see what openHAB runtime says. |
for openHAB (Karaf) there is the dedicated |
This is just the internal data structure of the CM implementation - DO NOT TOUCH IT! |
At least a hint, thanks. I will investigate again. |
Here are my observations with a freshly installed openHAB, build 1378: Without any modifications and the simple script I get the following output:
and content of
With
I get the following log output:
and content in the config file:
All this w/o a restart. The |
Are you going to change RuleEngine to ruleEngine? |
My /conf/services/runtime.cfg currently has this...
But my /userdata/config/org/eclipse/smarthome/threadpool.config shows this (note the different case in ruleEngine from yours)...
Restarts and modifying runtime.cfg did not change this. But by manually changing /userdata/config/org/eclipse/smarthome/threadpool.config (replacing ruleEngine with RuleEngine) and restarting, I now have more than 5 threads and changes to runtime.cfg are reflected in threadpool.cfg! |
It might be that Felix ConfigAdmin has issues with cases and fails to update "RuleEngine", if there is already an entry "ruleEngine" - who knows... |
I will create a PR where discussion about backwards compatibility can take place. |
To conform to all other thread pool names change the rule engine thread pool name from `RuleEngine` to `ruleEngine`. Relates to eclipse-archived#6289. Signed-off-by: Henning Treu <henning.treu@telekom.de>
To conform to all other thread pool names change the rule engine thread pool name from `RuleEngine` to `ruleEngine`. Relates to #6289. Signed-off-by: Henning Treu <henning.treu@telekom.de>
Resolved by #6310 |
I have this issue right now on 2.5.
threadpool.config shows the same values, as it does in karaf, but still it's up to 5 threads only. |
Did you try |
I did and just did it again on a fresh install of OH - no change whatsoever... |
I dunno. It works for me. With this setting in runtime.cfg
And with this rule...
Using the console to send commands to the item, the executions queue up after 8 rules are executing.
|
Tried it, doesn't work unfortunately. :( 2020-05-03 11:11:49.617 [INFO ] [rthome.model.script.test-thread-pool] - Rule running I have changed the /etc/openhab2/services/runtime.cfg to But I can't see any change either changing from ruleEngine=50 to ruleEngine=8. I'm not sure if there's a maximum value at all. |
Since 2.5M2, OH has not used ESH and many of the package names changed. Try org.openhab.threadpool:ruleEngine. BTW, this will not be needed in OH 3.0, since the old rule engine will be removed. |
openHAB doesn't impose a limit, so you're only limited by the config of the host on which you're running. Maybe the original value is cached somewhere. What do you see in this file?
|
I think these were changed in 3.0. I seem to recall a PR that changed a bunch of them. For 2.5.x, I believe they are still |
Of course! This wasn't renamed until late December. I should have looked into the history before replying... |
:org.apache.felix.configadmin.revision:=L"13"
Um, sorry I'm not quite sure I'm getting your point :) Could you elaborate please? |
No it's not ok. It contains RuleEngine, but not ruleEngine. Here's what mine looks like.
|
Hah, ok... I should maybe change it there directly... Does the first line have any importance or should I just omit that from yours and keep what I have? It's interesting because at the same time in my runtime.cfg it's with small letters:
|
I seem to recall that it's advisable to shutdown openHAB before you edit that file.
Sorry, I have no idea. If it were me, I'd only edit what was absolutely necessary. |
Will do, but I'll only have time for it tomorrow. Thank you for your help, I'll post my results! |
It works. :) Thank you very much for the help and thank you for sharing your config file! |
Using OH snapshot 1372, after modifying runtime.cfg, the thread pools do not seem to change from 5. Discussed in the OH forum...
https://community.openhab.org/t/sporadic-delayed-rule-starting-thread-pool-too-small/52425/6?u=5iver
I didn't look into it much, but the other thread pool settings appear to take the settings properly from runtime.cfg. Related to #5040, and hopefully this will put some life back into #5081.
The text was updated successfully, but these errors were encountered: