ASP.Net Web 窗体应用程序池设置
ASP.Net Web Forms Application Pool settings
我们有一个应用程序池和一个旧的 asp.net 2.0 webforms 应用程序,它使用专有库连接到数据库。
我们面临 OutOfMemoryExceptions,因为库是一个我们无法更改的黑盒子。我正在尝试确保正确设置应用程序池设置。
网络服务器安装了 8 GB 内存,应用程序池的设置为:
回收利用
私有内存限制 (KB):0
常规时间间隔(分钟):0
Request.Limit: 0
虚拟内存限制(KB):3145728
你认为它是正确的吗?
异常信息:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
ContentType: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Data.SqlClient.SqlBuffer.set_SqlGuid(SqlGuid value)
at System.Data.SqlClient.TdsParser.ReadSqlValueInternal(SqlBuffer value, Byte tdsType, Int32 typeId, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i)
at Adam.Core.DataMapper.PagingDataReader.GetGuid(Int32 i)
at Adam.Core.DataMapper.Fields.GuidTableField.AssignReader(IDataReader reader, Int32 columnIndex)
at Adam.Core.DataMapper.ItemBase.AssignReader(IDataReader reader, SqlMappings mappings)
at Adam.Core.DataMapper.ExtendedItemBase.AssignReader(IDataReader reader, SqlMappings mappings)
at Adam.Core.Records.RecordCollection.Load(SearchExpression expression, String sortOrder, Int32 pageNumber, Int32 recordsPerPage, Boolean& isLastPage, Int32 maxRecords, RecordLoadOptions options)
at Adam.Core.Records.RecordCollection.Load(SearchExpression expression, String sortOrder, Int32 pageNumber, Int32 recordsPerPage, Boolean& isLastPage, Int32 maxRecords)
at Adam.Core.DataMapper.ExtendedItemBaseCollection.Load(SearchExpression expression, String sortOrder)
at AssetFilePage.Page_Load(Object sender, EventArgs e) in e:\App\WEBAPP.WebSite\file.aspx.cs:line 27
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
提前致谢。
我建议使用以下设置作为起点:
私有内存限制 (KB):1048576
常规时间间隔(分钟):1440
Request.Limit: 10000
虚拟内存限制(KB):1048576
将私有和虚拟内存限制设置为 1Gb,定期回收(24 小时)和某种请求限制(0 为无限制)。这将是一个监控您的应用程序并微调以下内容直到您获得最佳位置的情况。
查看此处了解更多信息:
https://technet.microsoft.com/en-gb/library/cc745955.aspx
我们有一个应用程序池和一个旧的 asp.net 2.0 webforms 应用程序,它使用专有库连接到数据库。
我们面临 OutOfMemoryExceptions,因为库是一个我们无法更改的黑盒子。我正在尝试确保正确设置应用程序池设置。
网络服务器安装了 8 GB 内存,应用程序池的设置为:
回收利用
私有内存限制 (KB):0 常规时间间隔(分钟):0 Request.Limit: 0 虚拟内存限制(KB):3145728
你认为它是正确的吗?
异常信息:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
ContentType: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Data.SqlClient.SqlBuffer.set_SqlGuid(SqlGuid value)
at System.Data.SqlClient.TdsParser.ReadSqlValueInternal(SqlBuffer value, Byte tdsType, Int32 typeId, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ReadColumnData()
at System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i)
at Adam.Core.DataMapper.PagingDataReader.GetGuid(Int32 i)
at Adam.Core.DataMapper.Fields.GuidTableField.AssignReader(IDataReader reader, Int32 columnIndex)
at Adam.Core.DataMapper.ItemBase.AssignReader(IDataReader reader, SqlMappings mappings)
at Adam.Core.DataMapper.ExtendedItemBase.AssignReader(IDataReader reader, SqlMappings mappings)
at Adam.Core.Records.RecordCollection.Load(SearchExpression expression, String sortOrder, Int32 pageNumber, Int32 recordsPerPage, Boolean& isLastPage, Int32 maxRecords, RecordLoadOptions options)
at Adam.Core.Records.RecordCollection.Load(SearchExpression expression, String sortOrder, Int32 pageNumber, Int32 recordsPerPage, Boolean& isLastPage, Int32 maxRecords)
at Adam.Core.DataMapper.ExtendedItemBaseCollection.Load(SearchExpression expression, String sortOrder)
at AssetFilePage.Page_Load(Object sender, EventArgs e) in e:\App\WEBAPP.WebSite\file.aspx.cs:line 27
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
提前致谢。
我建议使用以下设置作为起点:
私有内存限制 (KB):1048576
常规时间间隔(分钟):1440
Request.Limit: 10000
虚拟内存限制(KB):1048576
将私有和虚拟内存限制设置为 1Gb,定期回收(24 小时)和某种请求限制(0 为无限制)。这将是一个监控您的应用程序并微调以下内容直到您获得最佳位置的情况。
查看此处了解更多信息: https://technet.microsoft.com/en-gb/library/cc745955.aspx