Under heavy load or when using jQuery's ajax abort function, we see requests build up in IIS to the point where no-one can connect and the entire site hangs, forcing a recycle.
A similar post from 3 years ago had a similar issue with .NET 4.5 and IIS 7.5 but Microsoft have stated this was fixed in 4.5.1 and released a patch for 4.5.
This problem on Windows Server 2012R2 using IIS 8 when trying to use State Server and even more so when using State Server on development machines running Windows 10 and IIS10. The patch cannot be installed on any of these machines as the installer is blocked by the presence of 4.5.1. Changing to In Proc reduces the occurrence of the issue but does not solve it completely.
This dead thread from this year on the IIS forum had a few others with the same issue but with no resolution. I have also tried setting the UploadReadAheadSize to 0 as suggested somewhere else but that did nothing to resolve the problem.
Has anyone else experienced and/or found a solution to this? Any input would be greatly appreciated.
The problem we had appeared to have been caused by someone implementing the suggestion in this post Can I access session state from an HTTPModule?.
This appears to trick the SessionStateModule into thinking it needs to load SessionState even if the handler that will eventually be executed isn't marked with IRequiresSessionState
by temporarily swapping it for one that is. Once SessionState is loaded the handler is swapped back to the original. I suspect, but have not proved, that if the request is cancelled the SessionStateModule is not releasing the locks because the handler "in play" at the time is not marked with IRequiresSessionState
; hence there is no clean up to do.
Removing the module and marking the handlers that didn't therefore need IRequiresSessionState
before made the problem go away.