locked
System.OutOfMemoryException on productionserver RRS feed

  • Question

  • A c# batch program NET Framework 3.5 SP1 on 32 bits Windows 2003 server fails after 3 hours.

    There are seperate 32bits (IIS+DB) W2003 Server machines. Memory is upgraded from 2 Gb to 4 GB but still fails.

    Smaller amount of data (on develop environment) gives no error.

    The program crashes on a (simple) SQL statement that should only select one result row.

    The data  (for id_loonstaatregel=69869603) is not special for itself.

    There are indexes for this select in the database.

    This program must held several (large) arraylists en objects (later) to serialize in memory.

    What can I do?

    Thanks for answering.

    Frits

    10-1-2012 18:15:57
      id_loonstaatregel=69869603   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
       at System.Text.UnicodeEncoding.GetString(Byte[] bytes, Int32 index, Int32 count)
       at System.Data.SqlClient.TdsParserStateObject.ReadString(Int32 length)
       at System.Data.SqlClient.TdsParser.CommonProcessMetaData(TdsParserStateObject stateObj, _SqlMetaData col)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader()
       at LAS.Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership)
       at LAS.Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(DBConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
       at LAS.Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(DBConnection connection, String spName, Object[] parameterValues)
       at Company.LAS.DL.LoonstaatregelDL.ExecuteGetPersoonLoonstaat(DBConnection oConn)
       at CoreServices.DAL.TransactionManager.Run(Boolean fIsTransaction, DBOperation[] fDBOperations)

    *** Exception of type 'System.OutOfMemoryException' was thrown. ---

       at CoreServices.DAL.TransactionManager.Run(Boolean fIsTransaction, DBOperation[] fDBOperations)
       at Company.LAS.DL.LoonstaatregelDL.GetPersoonLoonstaat(Int64 id_loonstaatregel, PersoonDO& objPersoon, LoonstatDO& objLoon)
       at Company.LAS.Loader.AanmakenCorLA2012.ProcessAanmakenCorLA2012(String id_job_run, String job_procedure, String job_recapfilenaam, String InterfaceCode, String fiscaalJaar, String fiscaalMaand, String SoortLAangifte)
       at Company.LAS.LAS_Batch.AanmakenLAMain.Main()




    Wednesday, January 11, 2012 12:01 PM

Answers