我服务器跑了一个asp和aspx网站 内存越用越大 快2G了 我把IIS配置了GZIP压缩 不知道是不是配置不对 请大侠们支招
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
css
swf
gif
jpg
xml
js"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
css
swf
gif
jpg
xml
js"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
css
swf
gif
jpg
xml
js"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="htm
html
txt
css
swf
gif
jpg
xml
js"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx"
>
</IIsCompressionScheme>
如果是的话:
要是IIS6的话,配置下应用程序池的回收时间。
如果IIS配置合适的话,看下程序是否有未释放的资源。
如果不是的话,看看服务器是否中毒。
我用这段代码看了一下
declare @table_id intset @table_id = object_id('News')dbcc showcontig(@table_id)结果,不知道要不要重建索引DBCC SHOWCONTIG scanning 'News' table...
Table: 'News' (82099333); index ID: 1, database ID: 22
TABLE level scan performed.
- Pages Scanned................................: 2
- Extents Scanned..............................: 2
- Extent Switches..............................: 1
- Avg. Pages per Extent........................: 1.0
- Scan Density [Best Count:Actual Count].......: 50.00% [1:2]
- Logical Scan Fragmentation ..................: 50.00%
- Extent Scan Fragmentation ...................: 50.00%
- Avg. Bytes Free per Page.....................: 1292.5
- Avg. Page Density (full).....................: 84.03%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
我的网站:svn服务器
2、设置应用程序池的回收时间,默认为1720小时,可以根据情况修改。同时,设置同时运行的w3wp进程数目为1。再设置当内存或者cpu占用超过多少,就自动回收内存.如果还是不能明显解决,那么考虑是程序编写和数据库设计时存在弊端.
如果需要帮助的话,我可以帮你。
SQL是不会回收内存的,也就是说SQL进程占用内存会一直增大
该多好.
不过还有几个问题你要确定一下。
1:编程过程中,确保内存都回收了。可能某个地方内存泄漏了。
2:如果App和DB在一起的话,请设置一下Db的内存。btw,你数据库是oracle?sqlserver?
oracle如果是存档模式很耗内存的~