I have an ASP.NET MVC application working on a Web Garden configuration. The application pool identity is set to a custom domain account (with local administator permissions). Application pool has 4 worker processes. Session state mode is set to serverState using the ASP.NET State service which runs on the same machine (not remote one).
Regarding to signalr I have noticed an OutOfMemoryException in the event log when trying to reconnect and negotiate and I am not being able to detect what is happening. Any help will be highly appreciated.
Some texts below in the errors are in Spanish (Sorry).
Below the reconnect error:
Event code: 3005
Event message: Excepción no controlada.
Event time: 05/11/2020 13:28:04
Event time (UTC): 05/11/2020 12:28:04
Event ID: 447eb425512c433387a36b70af64f768
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-2-132490528843179653
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\MyMVCApp\
Machine name: MyServer
Process information:
Process ID: 1668
Process name: w3wp.exe
Account name: MyDomain\MyAppPoolCustomIdentity
Exception information:
Exception type: InvalidOperationException
Exception message: El método de inicialización Run previo al inicio de la aplicación del tipo WebActivatorEx.ActivationManager produjo una excepción con el siguiente mensaje de error: Se produjo una excepción de tipo 'System.OutOfMemoryException'..
en System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
en System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
en System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
en System.Web.Compilation.BuildManager.ExecutePreAppStart()
en System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Se produjo una excepción de tipo 'System.OutOfMemoryException'.
en System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
en System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
en System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
en System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
en System.Reflection.Assembly.LoadFrom(String assemblyFile)
en WebActivatorEx.ActivationManager.get_Assemblies()
en WebActivatorEx.ActivationManager.RunActivationMethods[T](Boolean designerMode)
en WebActivatorEx.ActivationManager.Run()
Request information:
Request URL: http://my.mvcapp.com/signalr/reconnect?transport=longPolling&clientProtocol=1.5&connectionToken=6Avu6HS5DNT2tKAPHT90nO3u8M2arqOCtaMVIGGiEi/ZsxSM3axZQUBukhn1C0p14qGfoIxy722kR3LhvsZb5Qq6ERwk8z9GA6DI4VGJ8fm8onV8pM79bGp2BTIwaareiiXFYGIWDJxWL7LKux6TwA==&connectionData=[{"name":"wstimerhub"}]
Request path: /signalr/reconnect
User host address: XXX.XX.X.XX
User:
Is authenticated: False
Authentication Type:
Thread account name: MyDomain\MyAppPoolCustomIdentity
Thread information:
Thread ID: 51
Thread account name: MyDomain\MyAppPoolCustomIdentity
Is impersonating: False
Stack trace: en System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures)
en System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
en System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
en System.Web.Compilation.BuildManager.ExecutePreAppStart()
en System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Custom event details:
And below the signalr negotitate error (Event id 1309):
Event code: 3005
Event message: Excepción no controlada.
Event time: 05/11/2020 18:09:47
Event time (UTC): 05/11/2020 17:09:47
Event ID: c19a08970c4c44abb969098d601bc6e1
Event sequence: 13649
Event occurrence: 2
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-4-132490644058804577
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\MyMVCApp\
Machine name: MyServer
Process information:
Process ID: 6936
Process name: w3wp.exe
Account name: MyDomain\MyAppPoolCustomIdentity
Exception information:
Exception type: OutOfMemoryException
Exception message: Se produjo una excepción de tipo 'System.OutOfMemoryException'.
en System.Web.Hosting.IIS7WorkerRequest.ReadRequestHeaders()
en System.Web.Hosting.IIS7WorkerRequest.GetKnownRequestHeader(Int32 index)
en System.Web.HttpWorkerRequest.HasEntityBody()
en System.Web.HttpRequest.GetEncodingFromHeaders()
en System.Web.HttpRequest.get_ContentEncoding()
en System.Web.HttpRequest.get_QueryStringEncoding()
en System.Web.HttpRequest.get_QueryStringText()
en System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
en System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
Request information:
Request URL: http://my.mvcapp.com/signalr/negotiate?clientProtocol=1.5&connectionData=[{"name":"wstimerhub"}]&_=1604596208232
Request path: /signalr/negotiate
User host address: XXX.XX.XXX.XX
User: MyDomain\OneUser
Is authenticated: True
Authentication Type: Negotiate
Thread account name: MyDomain\MyAppPoolCustomIdentity
Thread information:
Thread ID: 86
Thread account name: MyDomain\MyAppPoolCustomIdentity
Is impersonating: False
Stack trace: en System.Web.Hosting.IIS7WorkerRequest.ReadRequestHeaders()
en System.Web.Hosting.IIS7WorkerRequest.GetKnownRequestHeader(Int32 index)
en System.Web.HttpWorkerRequest.HasEntityBody()
en System.Web.HttpRequest.GetEncodingFromHeaders()
en System.Web.HttpRequest.get_ContentEncoding()
en System.Web.HttpRequest.get_QueryStringEncoding()
en System.Web.HttpRequest.get_QueryStringText()
en System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
en System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
Custom event details: