Azure diagnostics and Class onStop (on scale down) - How to prevent log loss? -
i initializing azure diagnostics inside onstart of web role, , have scheduled transfer logs every 5 minutes. when auto-scale shuts down 1 roles loosing logs since last transfer. can in onstop prevent happening? there way force log transfer , prevent onstop finishing until it's done? thanks!
just have log transfer in onstop method. or alternatively, if that's done in thread, use flag , loop in onstop method sleep until flag set.
savelogasync(); while(!saved) { thread.sleep(100); }
there still max amount of time onstop method run before it's forced shut down. think it's 5 minutes.
Comments
Post a Comment