Yes. Open openhab-cli console
, and run the following commands:
config:edit org.openhab.threadpool
config:property-set safeCall 100
config:update
You can confirm that it worked in several ways:
In console, you can run these to view all current values:
config:edit org.openhab.threadpool
config:property-list
You can do cat /var/lib/openhab/config/org/openhab/threadpool.config
(depending on where your installation is located).
Or you can drop the following JRuby script into OPENHAB_CONF/automation/ruby (when you have the JRuby add-on installed):
org.openhab.core.common.ThreadPoolManager.field_reader :pools
tp = org.openhab.core.common.ThreadPoolManager.pools["safeCall"]
logger.info(tp.maximum_pool_size)
You can even recover from a blocked up thread pool with this script:
org.openhab.core.common.ThreadPoolManager.field_reader :pools
tp = org.openhab.core.common.ThreadPoolManager.pools["safeCall"]
def unblock_thread_pool(tp)
(tp.maximum_pool_size + 1).times do
tp.submit { sleep 1 }
end
end
unblock_thread_pool(tp)