OutOfMemoryException while running EPiServer Find Content Indexing job

  • Updated

 

Cleared the index and the EPiServer Find Content Indexing job gives the following error:

[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]

   System.IO.MemoryStream.set_Capacity(Int32 value) +89

   System.IO.MemoryStream.EnsureCapacity(Int32 value) +90

   System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) +326

   System.IO.BinaryWriter.Write(String value) +396

   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +2409

 

[ArgumentException: Error serializing value 'System.String[]' of type 'System.String[].']

   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3881

   System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +144

   System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph, Purpose purpose) +71

   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Serialize(Object state, Purpose purpose) +13

   System.Web.UI.Util.SerializeWithAssert(IStateFormatter2 formatter, Object stateGraph, Purpose purpose) +40

   System.Web.UI.HiddenFieldPageStatePersister.Save() +106

   System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +108

   System.Web.UI.Page.SaveAllState() +653

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1139

The out of memory issue occurred when running dev site on IIS express, works fine in IIS.