Sending an HTTP Request

I am already familiar with everything you wrote (with regards to rules, and thanks to this thread, also with regards to timers).

I don’t use any Thread::sleep, all my sendHTTP* calls were within createTimer to prevent rules hanging, and apart of this my rules don’t use any timers (I do have 16 cron-based rules and 3 astro-based rules, but they are all well spread along the day).

I am not familiar, though, with the OS, how it should behave, and how to analyze the usage of resources, and making sure it works as it should, or I should look into specific areas and analyze them.

As @rlkoshak wrote,

I am looking for what causes the number of threads growing on my system, and whether this is a "temporary"grow (and threads get released over time) or it is a “constant” grow.

If it helps, my setup is using openhabian over a RPi 3B+ with the following bindings:

  • Astro (only 3 very short rules are triggered by the astro binding)
  • Expire (~30 items using it)
  • HarmonyHub
  • Xiaomi Mi (2 nodes connected to it)
  • Network (pinging 4 iPhones)
  • Samsung Tv (polling every 1 second)
  • openHAB Weather (polling every 2 minutes)
  • YamahaReceiver (polling every 10 seconds)
  • ZWave (~22 nodes connected to it)

Also using:

  • openHAB Cloud connector
  • Google Calendar connector
  • Mapdb for RestoreOnStartup
  • Influxdb for some other items (installed grafana as well, but didn’t “play” with it too much, yet)

Here is a the full bundle list:

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID │ State    │ Lvl │ Version                │ Name
 20 │ Active   │  80 │ 5.3.1.201602281253     │ OSGi JAX-RS Connector
 21 │ Active   │  80 │ 2.7.0.v20170129-0911   │ Gson: Google Json Library for Java
 22 │ Active   │  80 │ 18.0.0                 │ Guava: Google Core Libraries for Java
 23 │ Active   │  80 │ 3.0.0.v201312141243    │ Google Guice (No AOP)
 26 │ Active   │  80 │ 3.5.5                  │ JmDNS
 28 │ Active   │  80 │ 1.0.0                  │ Units of Measurement API
 30 │ Active   │  80 │ 1.1.0.Final            │ Bean Validation API
 31 │ Active   │  80 │ 2.0.1                  │ javax.ws.rs-api
 32 │ Active   │  80 │ 3.2.0.v201101311130    │ ANTLR Runtime
 35 │ Active   │  80 │ 3.2.1                  │ Commons Collections
 36 │ Active   │  80 │ 1.1                    │ Commons Exec
 37 │ Active   │  80 │ 2.2.0                  │ Commons IO
 38 │ Active   │  80 │ 2.6                    │ Commons Lang
 47 │ Active   │  80 │ 4.2.1                  │ Apache Karaf :: OSGi Services :: Event
 63 │ Active   │  80 │ 4.6.0                  │ Apache XBean OSGI Bundle Utilities
 64 │ Active   │  80 │ 4.6.0                  │ Apache XBean :: Classpath Resource Finder
 65 │ Active   │  80 │ 2.12.0.v20160420-0247  │ EMF Common
 66 │ Active   │  80 │ 2.12.0.v20160420-0247  │ EMF Ecore
 67 │ Active   │  80 │ 2.11.0.v20160420-0247  │ EMF Change Model
 68 │ Active   │  80 │ 2.12.0.v20160420-0247  │ EMF XML/XMI Persistence
 69 │ Active   │  80 │ 3.8.0.v20160509-1230   │ Common Eclipse Runtime
 70 │ Active   │  80 │ 3.6.100.v20160223-2218 │ Extension Registry Support
 80 │ Active   │  80 │ 9.4.11.v20180605       │ Jetty :: Proxy
 94 │ Active   │  80 │ 0.4.1.v20180515-1321   │ org.eclipse.lsp4j
 95 │ Active   │  80 │ 0.4.1.v20180515-1321   │ org.eclipse.lsp4j.jsonrpc
 96 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome OAuth2Client
 97 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Config Core
 98 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Configuration Discovery
 99 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Configuration mDNS Discovery
100 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Config Dispatcher
101 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Config XML
102 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core
103 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Audio
104 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Binding XML
105 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core ID
106 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Persistence
107 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Scheduler Service
108 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Semantics
109 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Thing
110 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Core Thing XML
111 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Transformation Service
112 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core Voice
113 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Console
114 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Console for OSGi runtime Karaf
115 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome HTTP Interface Bundle
116 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome JavaSound I/O, Fragments: 183
117 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Monitor
118 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Net I/O Bundle
119 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome REST Interface Bundle
120 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Core REST API
121 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome REST mDNS Announcer
122 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome REST Interface JAX-RS optimization Bundle
123 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Sitemap REST API
124 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome SSE REST API
125 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Voice REST API
126 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Bonjour/MDS Service Discovery Bundle
127 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Web Audio Support
128 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Model Core
129 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Item Model
130 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Item Model IDE
131 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Item Model Runtime
132 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Language Server
133 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Persistence Model
134 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Persistence Model IDE
135 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Persistence Runtime
136 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Rule Model
137 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Rule Model IDE
138 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Rule Runtime
139 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Script
140 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Script Model IDE
141 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Script Runtime
142 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Sitemap Model
143 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Sitemap Model IDE
144 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Sitemap Runtime
145 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Thing Model
146 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Thing Model IDE
147 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Thing Model Runtime
148 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Json Storage Service
149 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome UI
150 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome UI Icons
151 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Classic IconSet
152 │ Active   │  80 │ 2.14.0.v20180522-1629  │ Xtend Runtime Library
153 │ Active   │  80 │ 2.14.0.v20180522-1629  │ Xtend Macro Interfaces
154 │ Active   │  80 │ 2.14.0.v20180522-1821  │ Xtext
155 │ Active   │  80 │ 2.14.0.v20180522-1833  │ Xtext Common Types
156 │ Active   │  80 │ 2.14.0.v20180522-1821  │ Xtext IDE Core
157 │ Active   │  80 │ 2.14.0.v20180522-1821  │ Xtext Utility
158 │ Active   │  80 │ 2.14.0.v20180522-1833  │ Xbase Model
159 │ Active   │  80 │ 2.14.0.v20180522-1833  │ Xbase Generic IDE Services
160 │ Active   │  80 │ 2.14.0.v20180522-1629  │ Xbase Runtime Library
175 │ Active   │  80 │ 1.9.6                  │ MIME streaming extension
177 │ Active   │  80 │ 6.2.0                  │ org.objectweb.asm
178 │ Active   │  80 │ 6.2.0                  │ org.objectweb.asm.commons
179 │ Active   │  80 │ 6.2.0                  │ org.objectweb.asm.tree
180 │ Active   │  90 │ 2.4.0                  │ openHAB Core
181 │ Active   │  80 │ 2.4.0                  │ openHAB Karaf Integration
183 │ Resolved │  80 │ 2.4.0                  │ openHAB Sound Support, Hosts: 116
184 │ Active   │  80 │ 2.4.0                  │ openHAB Dashboard UI
189 │ Active   │  80 │ 1.0.2                  │ Units of Measurement Common Library
190 │ Active   │  80 │ 1.0.8                  │ Units of Measurement Implementation for Java SE
191 │ Active   │  80 │ 1.6.0                  │ Commons Codec
192 │ Active   │  80 │ 3.3.0                  │ Commons Net
193 │ Active   │  80 │ 4.2.3                  │ Apache HttpClient OSGi bundle
194 │ Active   │  80 │ 4.2.3                  │ Apache HttpCore OSGi bundle
195 │ Active   │  80 │ 3.1.0.7                │ Apache ServiceMix :: Bundles :: commons-httpclient
196 │ Active   │  80 │ 2.4.0                  │ openHAB 1.x Compatibility Layer
197 │ Active   │  80 │ 1.1.1.201605111122     │ Swagger Provider
198 │ Active   │  80 │ 2.4.5                  │ Jackson-annotations
199 │ Active   │  80 │ 2.4.5                  │ Jackson-core
200 │ Active   │  80 │ 2.4.5                  │ jackson-databind
201 │ Active   │  80 │ 2.4.5                  │ Jackson-dataformat-XML
202 │ Active   │  80 │ 2.4.5                  │ Jackson-dataformat-YAML
203 │ Active   │  80 │ 2.4.5                  │ Jackson-module-JAXB-annotations
204 │ Active   │  80 │ 2.1.0                  │ json-path
205 │ Active   │  80 │ 3.14.0                 │ nrjavaserial
206 │ Active   │  80 │ 3.15.0.OH2             │ nrjavaserial
207 │ Active   │  80 │ 1.5.8                  │ swagger-annotations
208 │ Active   │  80 │ 1.5.8                  │ swagger-core
209 │ Active   │  80 │ 1.5.8                  │ swagger-jaxrs
210 │ Active   │  80 │ 1.5.8                  │ swagger-models
211 │ Active   │  80 │ 3.19.0.GA              │ Javassist
212 │ Active   │  80 │ 2.2                    │ json-smart
213 │ Active   │  80 │ 3.2.1                  │ Apache Commons Lang
214 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Astro Binding
215 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Configuration UPnP Discovery
216 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Configuration USB-Serial Discovery
217 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Configuration USB-Serial Discovery Linux sysf Scanning
218 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Config Serial
219 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Serial Transport
220 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Serial Transport for RXTX
221 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Serial Transport extension for RXTX RFC2217
222 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome UPnP Transport Bundle
223 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Exec Transformation Service
224 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome JavaScript Transformation Service
225 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome JSonPath Transformation Service
226 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Map Transformation Service
227 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome RegEx Transformation Service
228 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Scale Transformation Service
229 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome XPath Transformation Service
230 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome Xslt Transformation Service
231 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Basic UI, Fragments: 249
232 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome WebApp UI, Fragments: 250
233 │ Active   │  80 │ 0.10.0.oh240           │ Eclipse SmartHome Paper UI, Fragments: 253
234 │ Active   │  80 │ 2.5.1                  │ JUPnP Library
235 │ Active   │  80 │ 1.13.0                 │ openHAB Telegram Action
236 │ Active   │  80 │ 2.4.0                  │ Amazon Echo Control Binding
237 │ Active   │  80 │ 1.13.0                 │ openHAB Expire Binding
238 │ Active   │  80 │ 2.4.0                  │ HarmonyHub Binding
239 │ Active   │  80 │ 2.4.0                  │ Xiaomi Mi Smart Home Binding
240 │ Active   │  80 │ 2.4.0                  │ Network Binding
241 │ Active   │  80 │ 2.4.0                  │ Samsung Tv Binding
242 │ Active   │  80 │ 1.13.0                 │ openHAB Weather Binding
243 │ Active   │  80 │ 2.4.0                  │ YamahaReceiver Binding
244 │ Active   │  80 │ 2.4.0                  │ ZWave Binding
245 │ Active   │  80 │ 1.13.0                 │ openHAB Google Calendar
246 │ Active   │  80 │ 2.4.0                  │ openHAB Cloud Connector Bundle
247 │ Active   │  80 │ 2.4.0                  │ openHAB REST Documentation
248 │ Active   │  80 │ 1.13.0                 │ openHAB InfluxDB Persistence bundle
249 │ Resolved │  75 │ 2.4.0                  │ openHAB Basic UI Fragment, Hosts: 231
250 │ Resolved │  75 │ 2.4.0                  │ openHAB Classic UI Fragment, Hosts: 232
251 │ Active   │  80 │ 2.4.0                  │ HABmin User Interface
252 │ Active   │  80 │ 2.4.0                  │ HABPanel User Interface
253 │ Resolved │  75 │ 2.4.0                  │ openHAB Paper UI Theme Fragment, Hosts: 233
254 │ Active   │  80 │ 0.9.10.v20160429-1435  │ reflections (wrap)
255 │ Active   │  80 │ 3.1.4                  │ Stax2 API
256 │ Active   │  80 │ 1.5.8.v20160511-1038   │ swagger-jersey2-jaxrs (wrap)
257 │ Active   │  80 │ 1.13.0                 │ openHAB MapDB Persistence Bundle