A Sharepoint box I adminster has become unstable and will throw several out of memory exceptions and then become unresponsive and require IIS – resets.
Has anyone come across this before? The box is a VM with 4 cores and 4GB of RAM and dosnt appear to be using 100% of anything consistantly.
ASP.NET event log:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1656383179/Root
Process ID: 2476
Exception: System.OutOfMemoryException
Message: Exception of type 'System.OutOfMemoryException' was thrown.
StackTrace:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
and .NET event log item:
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 mscorlib, P5 2.0.0.0, P6 4be90358, P7 12d9, P8 9, P9 system.outofmemoryexception, P10 NIL.
That is a common problem if you have a lot of custom code wrote by not very competent developers. There are a lot of IDisposable objects in Sharepoint which should be properly disposed. So, if someone violates this rule, especially in webparts which are accessed very often, the memory could be trashed with such objects, which in the most bad situations can even cause OutOfMemoryException. There can be other situations, but this is the most common.