Case study, about cnblogs
2006-09-18 19:17 lixiong 阅读(3594) 评论(8) 编辑 收藏 举报在准备案例研究的时候,恰好遇上了博客园的dudu抱怨网站偶尔崩溃,性能上也有问题。问题背景请参考:
博客园Blog程序遇到的奇怪问题
http://www.cnblogs.com/dudu/archive/2006/08/09/472162.html
从问题描述上看,首先是” 浏览器处于连接状态,却一直得不到服务器的响应”,这说明服务器发生了hang的问题。在事件日志中观察到Recycle的原因是工作进程没有及时地响应IIS的心跳包,进一步说明服务器很可能发生了死锁。所以建议抓取性能日志和dump。
下面是问题发生时候的dump分析:
首先用!threads命令看看线程的统计情况:
0:056> !threads
ThreadCount: 48
UnstartedThread: 0
BackgroundThread: 48
PendingThread: 0
DeadThread: 0
Hosted Runtime: no
PreEmptive GC Alloc Lock
ID OSID ThreadOBJ State GC Context Domain Count APT Exception
12 1 d60 001541e0 1808220 Enabled 281f904c:281faa6c 1e8517b0 1 Ukn (Threadpool Worker)
17 2 978 00195400 b220 Enabled 238bb8a0:238bd5e8 001dc760 0 MTA (Finalizer)
18 3 ee4 001dd368 80a220 Enabled 00000000:00000000 001dc760 0 MTA (
19 4 7e0 001f90f0 880b220 Enabled 00000000:00000000 001dc760 0 MTA (
…
62 2e 968 1ea139d0 180b220 Enabled 241eaaa8:241ec99c 1e8517b0 1 MTA (Threadpool Worker)
63 2f e4c 0ee769e8 180b220 Enabled 23ef5560:23ef63a8 1e8517b0 1 MTA (Threadpool Worker)
64 30 798 0ee11340 180b220 Enabled 00000000:00000000 1e8517b0 1 MTA (Threadpool Worker)
66 20 e40 00173578 880b220 Enabled 00000000:00000000 001dc760 0 MTA (
统计下来一共有 48个CLR线程。根据以往的经验,超过30个CLR线程表明程序中往往有blocking发生。仔细观察!threads命令的输入,注意看有没有线程处于GC状态。(触发GC的线程在最后一栏会有GC标志)
如果有线程处于GC状态,很有可能blocking是GC导致的,大多数线程在等待GC完成。在这个案例中,并没有看到GC发生,所以接下来检查各个CLR线程的具体callstack:
0:056> ~* e !clrstack
…
48个线程的输入很长,所以这里就省略了完整的输出。从该命令的结果可以观察到,几乎所有的CLR线程都等待在类似的callstack上。下面是一些节选:
OS Thread Id: 0x798 (64)
ESP EIP
3437de28 7d61c824 [InlinedCallFrame: 3437de28] <Module>.SNIReadSync(SNI_Conn*, SNI_Packet**, Int32)
3437de24 6518f867 SNINativeMethodWrapper.SNIReadSync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
3437de9c 65307213 System.Data.SqlClient.TdsParserStateObject.ReadSni(System.Data.Common.DbAsyncResult, System.Data.SqlClient.TdsParserStateObject)
3437ded4 65306f5b System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32)
3437dee0 653066b7 System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
3437dee8 65306912 System.Data.SqlClient.TdsParserStateObject.ReadByte()
3437def0 652fc46c System.Data.SqlClient.TdsParser.Run(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject)
3437df44 652d7850 System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
3437df58 652d5a8f System.Data.SqlClient.SqlDataReader.get_MetaData()
3437df84 652c8fcc System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String)
3437dfbc 652c8a36 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean)
3437e00c 652c8735 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Data.Common.DbAsyncResult)
3437e04c 652c8699 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
3437e068 652c75ef System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
3437e0a4 652c734d System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(System.Data.CommandBehavior)
3437e0a8 65237618 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior)
3437e0ac 303c32b3 Server.Framework.Data.AdoHelper.ExecuteReader(System.Data.IDbCommand, AdoConnectionOwnership)
3437e0d8 303c2f43 Server.Framework.Data.AdoHelper.ExecuteReader(System.Data.IDbConnection, System.Data.IDbTransaction, System.Data.CommandType, System.String, System.Data.IDataParameter[], AdoConnectionOwnership)
3437e11c 303c1691 Server.Framework.Data.AdoHelper.ExecuteReader(System.String, System.Data.CommandType, System.String, System.Data.IDataParameter[])
3437e154 303c1625 Server.Framework.Data.SqlHelper.ExecuteReader(System.String, System.Data.CommandType, System.String, System.Data.SqlClient.SqlParameter[])
3437e168 303c15bc Server.Framework.Data.SqlDataProvider.GetReader(System.String, System.Data.SqlClient.SqlParameter[])
3437e19c 306f148c Server.Framework.Data.SqlDataProvider.GetPagedEntriesReader(Server.Framework.Components.PagedEntryQuery)
3437e1a8 307e00ea Server.Framework.Data.DataDTOProvider.GetPagedEntries(Server.Framework.Components.PagedEntryQuery)
3437e1d8 306ffefe Server.Framework.Entries.GetPagedEntries(Server.Framework.Components.PagedEntryQuery)
3437e1dc 306ffec0 Server.Service.EntryService.GetPagedEntries(System.String, Server.Framework.Components.PagedEntryQuery, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheItemExpiration)
3437e1f0 306ffd61 Server.Service.EntryService.GetPagedHomeEntries(Server.Framework.Configuration.BlogConfig, Int32, Int32)
3437e25c 306ffbcf Server.Web.AggSite.PagedPosts.PagedDataBind()
3437e26c 303c576b Server.Web.AggSite.PagedPosts.Page_Load(System.Object, System.EventArgs)
OS Thread Id: 0xe4c (63)
ESP EIP
342fdc7c 7d61c824 [InlinedCallFrame: 342fdc7c] <Module>.SNIReadSync(SNI_Conn*, SNI_Packet**, Int32)
342fdc78 6518f867 SNINativeMethodWrapper.SNIReadSync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
342fdcf0 65307213 System.Data.SqlClient.TdsParserStateObject.ReadSni(System.Data.Common.DbAsyncResult, System.Data.SqlClient.TdsParserStateObject)
342fdd28 65306f5b System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32)
342fdd34 653066b7 System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
342fdd3c 65306912 System.Data.SqlClient.TdsParserStateObject.ReadByte()
342fdd44 652fc46c System.Data.SqlClient.TdsParser.Run(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject)
342fdd98 652d7850 System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
342fddac 652d5a8f System.Data.SqlClient.SqlDataReader.get_MetaData()
342fddd8 652c8fcc System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String)
342fde10 652c8a36 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean)
342fde60 652c8735 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Data.Common.DbAsyncResult)
342fdea0 652c8699 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
342fdebc 652c75ef System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
342fdef8 652c734d System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(System.Data.CommandBehavior)
342fdefc 65237618 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior)
342fdf00 6524063e System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet, System.Data.DataTable[], Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
342fdf58 65240146 System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet, Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
342fdf9c 6523ff2b System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)
342fdfcc 303c9baf Server.Framework.Data.AdoHelper.ExecuteDataset(System.Data.IDbCommand)
342fe004 303c9ac8 Server.Framework.Data.AdoHelper.ExecuteDataset(System.Data.IDbConnection, System.Data.CommandType, System.String, System.Data.IDataParameter[])
342fe028 303c99fb Server.Framework.Data.AdoHelper.ExecuteDataset(System.String, System.Data.CommandType, System.String, System.Data.IDataParameter[])
342fe064 305ca76f Server.Framework.Data.AdoHelper.ExecuteDataset(System.String, System.Data.CommandType, System.String)
342fe070 305ca746 Server.Framework.Data.SqlHelper.ExecuteDataset(System.String, System.Data.CommandType, System.String)
342fe080 305cfb92 Server.Web.Controls.FocusedBloggerControl.Render(System.Web.UI.HtmlTextWriter)
OS Thread Id: 0x968 (62)
ESP EIP
3427df54 7d61c824 [InlinedCallFrame: 3427df54] <Module>.SNIReadSync(SNI_Conn*, SNI_Packet**, Int32)
3427df50 6518f867 SNINativeMethodWrapper.SNIReadSync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
3427dfc8 65307213 System.Data.SqlClient.TdsParserStateObject.ReadSni(System.Data.Common.DbAsyncResult, System.Data.SqlClient.TdsParserStateObject)
3427e000 65306f5b System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32)
3427e00c 653066b7 System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
3427e014 65306912 System.Data.SqlClient.TdsParserStateObject.ReadByte()
3427e01c 652fc46c System.Data.SqlClient.TdsParser.Run(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject)
3427e070 652d7850 System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
3427e084 652d5a8f System.Data.SqlClient.SqlDataReader.get_MetaData()
3427e0b0 652c8fcc System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String)
3427e0e8 652c8a36 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean)
3427e138 652c8735 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Data.Common.DbAsyncResult)
3427e178 652c8699 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
3427e194 652c75ef System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
3427e1d0 652c734d System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(System.Data.CommandBehavior)
3427e1d4 65237618 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior)
3427e1d8 6524063e System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet, System.Data.DataTable[], Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
3427e230 65240146 System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet, Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
3427e274 6523ff2b System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)
3427e2a4 303c9baf Server.Framework.Data.AdoHelper.ExecuteDataset(System.Data.IDbCommand)
3427e2dc 303c9ac8 Server.Framework.Data.AdoHelper.ExecuteDataset(System.Data.IDbConnection, System.Data.CommandType, System.String, System.Data.IDataParameter[])
3427e300 303c99fb Server.Framework.Data.AdoHelper.ExecuteDataset(System.String, System.Data.CommandType, System.String, System.Data.IDataParameter[])
3427e33c 303c999a Server.Framework.Data.SqlHelper.ExecuteDataset(System.String, System.Data.CommandType, System.String, System.Data.SqlClient.SqlParameter[])
3427e350 30519a7d Server.Web.UI.Controls.BlogRank.Page_Load(System.Object, System.EventArgs)
OS Thread Id: 0x660 (61)
ESP EIP
33fbde90 7d61c824 [InlinedCallFrame: 33fbde90] <Module>.SNIReadSync(SNI_Conn*, SNI_Packet**, Int32)
33fbde8c 6518f867 SNINativeMethodWrapper.SNIReadSync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
33fbdf04 65307213 System.Data.SqlClient.TdsParserStateObject.ReadSni(System.Data.Common.DbAsyncResult, System.Data.SqlClient.TdsParserStateObject)
33fbdf3c 65306f5b System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32)
33fbdf48 653066b7 System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
33fbdf50 65306912 System.Data.SqlClient.TdsParserStateObject.ReadByte()
33fbdf58 652fc46c System.Data.SqlClient.TdsParser.Run(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject)
33fbdfac 652d7850 System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
33fbdfc0 652d5a8f System.Data.SqlClient.SqlDataReader.get_MetaData()
33fbdfec 652c8fcc System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String)
33fbe024 652c8a36 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean)
33fbe074 652c8735 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Data.Common.DbAsyncResult)
33fbe0b4 652c8699 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
33fbe0d0 652c75ef System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
33fbe10c 652c734d System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(System.Data.CommandBehavior)
33fbe110 65237618 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior)
33fbe114 303c32b3 Server.Framework.Data.AdoHelper.ExecuteReader(System.Data.IDbCommand, AdoConnectionOwnership)
33fbe140 303c2f43 Server.Framework.Data.AdoHelper.ExecuteReader(System.Data.IDbConnection, System.Data.IDbTransaction, System.Data.CommandType, System.String, System.Data.IDataParameter[], AdoConnectionOwnership)
33fbe184 303c1691 Server.Framework.Data.AdoHelper.ExecuteReader(System.String, System.Data.CommandType, System.String, System.Data.IDataParameter[])
33fbe1bc 303c1625 Server.Framework.Data.SqlHelper.ExecuteReader(System.String, System.Data.CommandType, System.String, System.Data.SqlClient.SqlParameter[])
33fbe1d0 303c15bc Server.Framework.Data.SqlDataProvider.GetReader(System.String, System.Data.SqlClient.SqlParameter[])
33fbe204 3051f587 Server.Framework.Data.SqlDataProvider.GetCommentOwnerBlogID(Int32)
33fbe218 3051f45a Server.Framework.Data.DataDTOProvider.GetCommentOwnerBlogID(Int32)
33fbe248 3051f426 Server.Framework.Entries.GetCommentOwnerBlogID(Int32)
33fbe24c 3051f38e Server.Web.UI.Controls.Comments.IsOwner(Int32)
33fbe284 3047f0b5 Server.Web.UI.Controls.Comments.CommentsCreated(System.Object, System.Web.UI.WebControls.RepeaterItemEventArgs)
33fbe36c 688b1f7e System.Web.UI.WebControls.Repeater.OnItemCreated(System.Web.UI.WebControls.RepeaterItemEventArgs)
33fbe380 688b1b31 System.Web.UI.WebControls.Repeater.CreateItem(Int32, System.Web.UI.WebControls.ListItemType, Boolean, System.Object)
33fbe3a0 688b19bb System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean)
33fbe3e0 688b1da2 System.Web.UI.WebControls.Repeater.OnDataBinding(System.EventArgs)
33fbe3e8 688b1bf9 System.Web.UI.WebControls.Repeater.DataBind()
33fbe3f0 3047a77d Server.Web.UI.Controls.Comments.BindComments()
33fbe41c 3047a620 Server.Web.UI.Controls.Comments.OnLoad(System.EventArgs)
……
从上面的callstack可以看到,这些CLR线程最终都是等待在SQL操作上。引发SQL操作的原因多姿多彩。既有UserControl在做DataBindg, 也有页面本身在做数据查询,还有的似乎在获取blog的comments和rank信息。从这些信息可以清楚地看到:
1. 导致线程停止运行的原因是SQL Operation Blocking。问题在数据库没有及时地返回结果
2. 虽然都是在等SQL,但是引发SQL操作的代码各不一样。说明并非某一个特别的SQL语句无法返回,而是整个SQL数据库有性能问题。
有了这些理解,接下来就是在SQL端检查SQL Blocking的具体原因,比如是否是SQL繁忙,还是某些SQL语句导致了锁表。为了让SQL端的检查更加方便,可以进一步从dump中挖据除正在等待数据库返回的SQL语句。具体步骤是分别切换到发生blocking的CLR线程,用!dumpstackobjects找到当前stack中的SqlCommand对象,然后找出Command对象的SQL命令.下面的步骤是找到61线程正在等待的SQL语句的步骤:
0:056> ~61s
eax=c000007c ebx=00000000 ecx=00000000 edx=00000000 esi=0000091c edi=00000000
eip=7d61c824 esp=33fbdc84 ebp=33fbdcf0 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202
ntdll!NtWaitForSingleObject+0x15:
7d61c824 c20c00 ret 0Ch
0:061> !dumpstackobjects
OS Thread Id: 0x660 (61)
ESP/REG Object Name
33fbdd1c 06c54d70 System.Data.SqlClient.TdsParserStateObject
33fbdd24 06c5cc94 System.Data.SqlClient.SNIPacket
33fbddf0 06c58d3c System.Data.SqlClient.SNIHandle
…
33fbdf7c 241860f4 System.Data.SqlClient.SqlDataReader
33fbdf90 241860f4 System.Data.SqlClient.SqlDataReader
33fbdf94 24185f5c System.Data.SqlClient.SqlCommand
…
0:061> !do 24185f5c
Name: System.Data.SqlClient.SqlCommand
MethodTable: 653c38e8
EEClass: 653c3868
Size: 132(0x84) bytes
GC Generation: 0
(C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll)
Fields:
MT Field Offset
790f9c18 4000184 4 System.Object 0 instance 00000000 __identity
7a745c0c 40008bc 8 ...ponentModel.ISite 0 instance 00000000 site
7a742e54 40008bd c ....EventHandlerList 0 instance 00000000 events
790f9c18 40008bb 104 System.Object 0 shared static EventDisposed
>> Domain:Value 001dc760:NotInit 1e8517b0:02d2595c <<
790fed1c 4001618 58 System.Int32 0 instance 217265 ObjectID
790fa3e0 4001619 10 System.String 0 instance 06b73cf4 _commandText
653de914 400161a 5c System.Int32 0 instance 4 _commandType
…
653dd3f0 4001638 54 ...DeferedProcessing 0 instance 00000000 _outParamEventSink
790fed1c 4001617 814 System.Int32 0 shared static _objectTypeCount
>> Domain:Value 001dc760:NotInit 1e8517b0:NotInit <<
0:061> !do 06b73cf4
Name: System.String
MethodTable: 790fa3e0
EEClass: 790fa340
Size: 70(0x46) bytes
GC Generation: 2
(C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll)
String: blog_GetCommentOwnerBlogID
Fields:
MT Field Offset
790fed1c 4000096 4 System.Int32 0 instance 27 m_arrayLength
790fed1c 4000097 8 System.Int32 0 instance 26 m_stringLength
790fbefc 4000098 c System.Char 0 instance 62 m_firstChar
790fa3e0 4000099 10 System.String 0 shared static Empty
>> Domain:Value 001dc760:790d6584 1e8517b0:790d6584 <<
79124670 400009a 14 System.Char[] 0 shared static WhitespaceChars
>> Domain:Value 001dc760:02b403f0 1e8517b0:06ba5fb4 <<
拿到这些数据后,剩下的工作就是跟DB Admin一起排查SQL数据库。SQL的排查可以专门写本书,超出了这里讨论的范围。
当看到ASP.NET问题跟数据库相关的时候,除了找到发生问题的SQL语句,下面一些额外的检查往往能够发现一些潜在的问题:
1. 通过! FinalizeQueue检查是否有大量的SqlConnection对象等待被Finalize. 通常Finalize queue中的Connection应该为0,或者小于10。当数量超过30的时候,通常说明代码中有使用完SqlConnection后忘记及时调用Close或者Dispose的情况。
2. 通过!dumpheap –stat检查内存中是否有大量的DataTable对象。如果有,通过!gcroot察看这些对象是否被保存到Session中。在Session中保存大量的数据容易导致很高的内存压力。