elfo icon indicating copy to clipboard operation
elfo copied to clipboard

Detect hanging actors

Open loyd opened this issue 3 years ago • 1 comments

An actor containing an infinite loop cannot be detected by elfo_busy_time_seconds for now, because the metric is updated after polling the actor's future. Thus, we need to have a way to calculate the metric also outside of the polling.

One possible implementation is to have some "global" ThreadLocal<(Addr, Timestamp)> (thread_local). Before polling the future we can store here the current actor's address and ts. Then, the special actor iterates over it periodically and updates the metric.

However, it requires a way to emit metrics with a custom ActorMeta. Also requires https://github.com/elfo-rs/elfo/issues/8

loyd avatar Apr 23 '22 13:04 loyd

Actually, it's already implemented in unstable-stuck-detection feature.

loyd avatar May 09 '23 15:05 loyd