thingsboard-python-rest-client icon indicating copy to clipboard operation
thingsboard-python-rest-client copied to clipboard

Intermittent Indefinite Hang in tb-rest-client Login Method

Open AtaGunZ opened this issue 9 months ago • 0 comments

We are experiencing an intermittent issue with the tb-rest-client (Version: 3.6.3) when used with ThingsBoard 3.6.3 Professional Edition. Approximately 1 in every 300–1000 login attempts results in the login call hanging indefinitely without throwing any exceptions. In these cases, the thread becomes blocked—observed to be stuck for 3+ hours—without any exception thrown or any indication of error in our logs.

This randomly happens ~once every few days, but I haven't previously investigated it further until now.

A py-spy stack dump (attached below) indicates that the thread is stuck during the SSL handshake phase of the login process.

Image

Environment:

ThingsBoard: 3.6.3 Professional Edition
tb-rest-client Version: 3.6.3

Please investigate this behavior and advise on a fix or a workaround. I have implemented a temporarily workaround by externally enforcing a timout myself, but it is an ugly solution.

AtaGunZ avatar Mar 12 '25 14:03 AtaGunZ