CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  IIS

IIS服务占用内存无法及时释放问题

楼主lifeliu()2004-09-03 15:42:48 在 Web 开发 / IIS 提问

IIS服务启动后,随着客户端的不断访问,内存的占用会增大,但当客户端不访问(晚上的时候),内存占用依然很大(单指IIS服务),没有自动释放,等转天每个客户端再次访问的时候,速度会非常慢,只有通过重新启动机器的方法释放内存,这样客户端访问的速度就会快上来。  
    操作系统为Windows   2000   Advance   Server,IIS5.0,内存512MB,DELL服务器。  
  问题点数:100、回复次数:6Top

1 楼net_lover(【孟子E章】)回复于 2004-09-03 15:57:03 得分 30

It's   all   because   of   a   bug   in   IIS4   and   5   obviously,   this   is   the   reason   why   session   on   end   never   fires   or   fires   randomly   in   cases,   it's   called   the   Session_OnEnd   bug   although   its   directly   related   to   random   session   timout   read   what   you   should   do   to   avoid   its   side   effects:  
   
  1-don't   do   any   actions   in   the   session   on   end   since   it   never   gets   fired..   in   most   cases   thus   it   will   not   be   reliable  
  2-   Don't   EVER   NEVER..EVER   (I'll   say   it   once   more   NEVEEEeeeR)   store   connections,   large   arrays,   objects   in   session   variables..   span   a   connection   outside   the   boubdaries   of   a   page..    
  3-and   the   most   important:   DON'T   LEAVE   A   CONNECTION   OPEN!!   close   all   connections   and   clean   them   :   Conn.close:Set   Conn   =   nothing..   deinitialise   also   ALL   created   objects   in   scripts   and   components,     Set   ObjName=   nothing   to   free   memory   resources..  
   
  The   problem   is   when   you   don't   do   one   of   the   last   2   points..   the   server   resources   are   exauhsted   (memory)   and   it   crashes   on   a   timely   basis..   since   the   session   data   stays   loaded   in   the   memory..  
  (this   bug   was   also   detected   in   IIS5   but   is   a   lot   less   frequent/   I'll   say   rare)      
   
   
  You   might   not   doing   all   this..   so   check   if   the   hosted   website   on   the   server   are   mis-codedTop

2 楼net_lover(【孟子E章】)回复于 2004-09-03 15:58:59 得分 0

http://support.microsoft.com/default.aspx?scid=kb;EN-US;254142Top

3 楼chentyoung(阿勇)回复于 2004-09-03 16:43:49 得分 0

在注册表中有个TTL设置,它是用来定义保留在高速缓存中的时间长度  
   
  ObjectCacheTLL   REG_DWORDTop

4 楼chentyoung(阿勇)回复于 2004-09-03 16:49:02 得分 20

晕.我还没写完就发上去啦.  
      那值是从0秒到30秒  
    可以用较低的TTL来防止系统内存被用于缓存大量短暂对象  
   
  位置在.  
  HKEY_LOCAL_MACHINES\SYSETM  
  \CurrentControlset  
      \Serivces  
          \Inetinfo  
              \Parameters  
   
  请楼主改注册表时备分好.,万一出事了,那我可帮不上忙了.Top

5 楼aspczlover(你的骄傲...)回复于 2004-09-03 18:10:46 得分 20

IIS的性能优化  
  http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=173479Top

6 楼mackyliu(才子-54caizi.com)回复于 2004-09-03 18:14:56 得分 30

跟代码有很大的关系。。。。。例如session不释放。。。  
  假设一个网站访问量比较大,单个用户如有3个session,没及时释放,多好的服务器,不用多久就垮了。。。Top

相关问题

  • 线程中释放占用的内存问题。
  • Application("*******")所占用的内存如何释放?
  • 这样释放CArray占用的内存正确吗?
  • 怎样释放类对象占用的内存? 散分!散分!
  • 请教如何释放Console窗口占用的内存
  • 数据库占用内存可以定期释放吗?
  • 关于占用内存不能释放的问题!
  • aspnet_wp占用的内存怎么释放?
  • return DataSet 后如何释放 DataSet 所占用内存?!
  • winForm内存占用?

关键词

  • 内存
  • iis
  • 客户
  • server
  • 释放
  • 访问
  • fired
  • don
  • never
  • 服务

得分解答快速导航

  • 帖主:lifeliu
  • net_lover
  • chentyoung
  • aspczlover
  • mackyliu

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo