Pyro5 icon indicating copy to clipboard operation
Pyro5 copied to clipboard

[FEAT] Add remote methode deadlock detection on the server side

Open arnaudiko opened this issue 1 year ago • 0 comments

I'm currently trying to detect a thread deadlocked in the remote method on the server side. The goal is to auto restart the server in this case. To do that I have create a custom Daemon. In my custome Daemon, I add a decoration to the "handleRequest" methode to measure the time between the input and the output (for each thread). Then I check, in an overload of the "housekeeping", if we have a deadlock in one of the watched thread.

It's works but if the client dosen't send request during a while, my code detect fault deadlock. This is du to the "protocol.recv_stub" call in the "pyro.Deamon.handleRequest" methode that wait a new client request.

Is there another solution for my need? If not, can you please add a system in pyro to manage my need ? or add hooks before and after the calling a a remote method on the server?

arnaudiko avatar Jul 26 '24 12:07 arnaudiko