fair-acc / opencmw-cpp

Open Common Middle-Ware library for accelerator equipment- and beam-based control systems at FAIR.
https://opencmw.io
GNU Lesser General Public License v3.0
10 stars 8 forks source link

[1pt, 0.5pt] Rest: Long-poll subscriptions without notifications disable HTTP interface #329

Closed frankosterfeld closed 11 months ago

frankosterfeld commented 1 year ago

When the UI creates a long-poll subscription (e.g. /dashboards) that receives only sporadic or no updates, the UI might run into a client-side timeout, triggering the REST client to start a new request.

The handling thread in RESTBackend.hpp remains being blocked waiting for a notification from the worker though (connection->waitForUpdate();). Thus each timeout/new request blocks another HTTP worker thread until the pool is exhausted. When that happens, the REST backend stops handling requests.