Saturday 15 January 2011

how can I monitor SignalR host for deadlock or long running thread? -


For a test example, I have a hub public method, which has a long lasting loop.

  public class testhub: hub {public zero to loopest () {while (true) {& lt; Do something & gt; }} Public zero chatmsg () {......}}   

Customers call a connect hub and call it - & gt; Testhub.server.looptest
Customer B connect hub and call it - & gt; Testhub.server.looptest

As a server administrator, how can I monitor all threads in the host hub, and kill any one without closing the whole IIS or self-host hub For example, let me assume that I create a UI like this:

Action to take action

---------- - ---------- - ----- LoopTest 5A3333 (Hit Button)
LoopTest 0 A 125 (Hit Button)
TouchsGji 1 second (Hit Button) < / Div>

You can definitely create some metrics in reporting using a custom that tracks the active hub method execution so that you can have visibility, but as far as "killing" is nothing to support it It would be that you want to kill a thread that has any unspecified side effects in any running program (.NET or otherwise) and you can not always ensure that You program is not left in a poor overall condition.

One thing you can possibly do if you really need it and want to move down the signal R framework to a way of highly customizing, custom hub method gesture implementation can be implemented Which probably understands how to pass the parameters in the method signature that it supports so that the rational cancellation requests can be followed in those methods, but it Mr. opt-in will, which means that implementation must actually call (or great Czech) within the loop argument.

No comments:

Post a Comment