orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Delayed silo shutdown?

Open skyflyer opened this issue 9 months ago • 3 comments

Hi!

I'm observing delayed silo shutdown in a local environment (UseLocalhostClustering). The silo is just started and then shutdown, it does not matter whether there are any grains available or not.

15:20:28 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5289
15:20:28 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down.
15:20:28 info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development
15:20:28 info: Microsoft.Hosting.Lifetime[0] Content root path: /Users/miha/work/BitsLifestyle/sandbox-orleans/OrleansDemo
^C15:20:37 info: Microsoft.Hosting.Lifetime[0] Application is shutting down...
15:20:37 info: Orleans.Hosting.SiloHostedService[0] Stopping Orleans Silo
15:20:42 warn: Orleans.Runtime.SiloLifecycleSubject[100452] 'Orleans.Runtime.Silo' stopped in stage 'Active (20000)' in '00:00:05.0043380'.
15:20:44 warn: Orleans.Runtime.SiloLifecycleSubject[100452] 'Orleans.Runtime.Silo' stopped in stage 'BecomeActive (19999)' in '00:00:02.0131510'.
15:20:44 info: Orleans.Hosting.SiloHostedService[0] Orleans Silo stopped.

You can see that when Ctrl-C is pressed (15:20:37), the Orleans runtime reports a message after 5 seconds...

I guess that could be quicker, as there's nothing that should be done during that time.

cc @ReubenBond

skyflyer avatar Feb 07 '25 14:02 skyflyer

Is this a similar issue? dotnet/orleans#9323

federico-laurianti avatar Feb 07 '25 19:02 federico-laurianti

Hi @federico-laurianti! I don't think it is related, since this is with a blank setup, without redis. Do you want a simple repro? (I'm using the simplest possible setup (I think) for a silo. FWIW, this is on macOS.

skyflyer avatar Feb 08 '25 15:02 skyflyer

I can observe same behavior as well with same conditions except I have Windows. I can add that "Warnings" in log is not something expected taking into account graceful shutdown, since in monitoring/log collection plain it may raise Alerts, and it is not clear how to deal with them - either it is something Ops should react or not.

uhrb avatar Mar 27 '25 13:03 uhrb