Open logiclrd opened 5 years ago
Could this be https://github.com/NancyFx/Nancy/issues/2563 still rearing its head? Maybe the app pool gets recycled at some point, and multiple requests for different views overlap as the new instance is spooling up?? I've tried to intentionally trigger this with an application that hits all endpoints at once, and haven't had any success thus far.
I added a work-around to the error pipeline that specifically detects this error and restarts the app pool in response. The logs show it periodically triggering. But now this same application has taken to displaying not-errors in view compilation:
The "Errors:" part of the view is completely blank and no system events are logged.
Restarting the app pool resolves the issue.
Is there any further information I can gather??
Prerequisites
DEBUG
andRELEASE
modeDescription
We have a web site built on Nancy 2.0.0-clinteastwood that is working fine, for the most part, but twice now has randomly started faulting. The fault that appears indicates that this line:
https://github.com/NancyFx/Nancy/blob/master/src/Nancy.ViewEngines.Razor/RazorViewEngine.cs#L238
...is encountering an exception because the
type
parameter toActivator.CreateInstance
isnull
. As far as I can tell, it abruptly enters this state after the application pool has been running continuously for some time.Here is the stack trace:
When this happens, other routes with different views continue to function just fine.
Steps to Reproduce
The route on which this error has been occurring looks like this:
The MainMenu view is simple and contains no logic:
We have not found a way to trigger this, but simply leaving this running on an installation on Windows Server 2012 DataCenter edition with .NET 4.7 installed ends up in this state after some time has elapsed.
System Configuration