opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.51k stars 827 forks source link

Redis: Poll now - unhandled exception #151

Closed win32nipuh closed 7 years ago

win32nipuh commented 8 years ago

My opserver configuration contains: 4 sql servers and 2 redis servers.

  1. Go to 'Redis'
  2. Click 'Poll now' 3.Visual Studio Just-In-Time Debigger appears: An unhandled Microsoft .NET Framework exception occured in w3wp.exe

Btw, checked the same for SQL Servers - it works ok.

The Event Log record:

An unhandled exception occurred and the process was terminated. Application ID: /LM/W3SVC/1/ROOT/opserver Process ID: 30160 Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. StackTrace: at System.Web.ThreadContext.AssociateWithCurrentThread(Boolean setImpersonationContext) at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext) at System.Web.LegacyAspNetSynchronizationContext.CallCallbackPossiblyUnderLock(SendOrPostCallback callback, Object state) at System.Web.LegacyAspNetSynchronizationContext.CallCallback(SendOrPostCallback callback, Object state) at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.AwaitTaskContinuation.<>c.<ThrowAsyncIfNecessary>b__18_0(Object s) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()

Xhanti commented 8 years ago

I've seen this as well

NickCraver commented 8 years ago

I was finally able to reproduce this in our production environment, should have a fix in the next commit. It's part of a very large async overhaul simplifying how polling in general works.

win32nipuh commented 8 years ago

Great, thanks

NickCraver commented 7 years ago

Closing this out, no longer an issue.