We have about 1000 separate sites that are the same .Net application (different codebase folders and app pools per site).
64 bit Windows and running .Net 2.0, application is compiled with 'AnyCPU' flag.
Since the same exact code works on the old server and never throws outofmemoryexceptions, we are holding off on spending major time profiling the application and examining dumps and performing code optimizations that would help avoid large object heap fragmentations (so we are hoping to get some hints on possible server configratuion issues that may be the culprit more than looking in the code base and optimizing it...).
Config 1 - Rackspace CloudSites (shared hosting, we can only FTP to it, no access to IIS settings):
1 IIS server, we don't have control over managing it but were told each app pool has a 250MB recycle limit.
Of our 1000 sites, many sites (20-50ish) apparently share the same app pool. We never get OutOfMemoryExceptions here and have the application running on it since years.
Config 2 - Rackspace Dedicated Server (full control):
Monster server with 128GB RAM, dedicated, each site has it's own app pool. All app pools have the same settings (350MB recycle limit). Not sure if this is of consequence but the page file size on this sever is 4GB (no idea what Config 1 has - does this need to be increased/addressed?).
Both configs are load balanced across 2 or 3 web servers, but that really doesn't matter here per se, since we are seing sites with NO TRAFFIC getting killed with OutOfMemoryExceptions.
Our issue was resolved by switching the 1000+ app pools to 32-bit mode instead of the default 64 bit.
We were able to confirm this by flipping back to 64-bit and immediately seeing the outofmemory exceptions.
I believe Jessen's points on the page file do have weight. . . since upping the page file required a system restart,
we tried to flip to 32-bit mode app pools (which doesn't require restarting) and got lucky.
If anyone has some interesting comments on this please feel free!
Thanks!
我们有大约 1000 个独立的站点,它们都是相同的 .Net 应用程序(每个站点有不同的代码库文件夹和应用程序池)。
64 位 Windows 并运行 .Net 2.0,应用程序使用“AnyCPU”标志进行编译。
由于相同的代码在旧服务器上运行并且永远不会抛出内存不足异常,因此 我们推迟花费大量时间分析应用程序并检查转储并执行代码优化,这将有助于避免大型对象堆碎片(因此我们希望得到一些提示可能的服务器配置问题可能是罪魁祸首,而不仅仅是查看代码库并对其进行优化......)。
配置 1 - Rackspace CloudSites(共享主机,我们只能通过 FTP 访问它,无法访问 IIS 设置):
1 IIS 服务器,我们无法控制管理它,但被告知每个应用程序池有 250MB 的回收限制。
在我们的 1000 个网站中,许多网站(20-50 左右)显然共享相同的应用程序池。我们在这里从未遇到过 OutOfMemoryExceptions,并且多年来一直在其上运行应用程序。
配置 2 - Rackspace 专用服务器(完全控制):
拥有 128GB RAM 的 Monster 服务器,专用,每个站点都有自己的应用程序池。所有应用程序池都具有相同的设置(350MB 回收限制)。不确定这是否有影响,但该服务器上的页面文件大小为4GB(不知道配置 1 有什么 - 这是否需要增加/解决?)。
这两个配置都在 2 或 3 个 Web 服务器之间进行负载平衡,但这本身并不重要,因为我们看到没有流量的网站因 OutOfMemoryExceptions 被杀死。
This is Windows server 2008 R2, 64 bit, 32gb RAM, I think its running IIS 7.5. We have set the application pool to use 4 worker process.
This is a ASP.NET 4 application but running in 32 bit compatability mode.
We are getting oSystem.OutOfMemoryException when the memory usage crosses more than 650-700MB/worker process.
I thought that it should be able to handle upto 2gb or atleast 1.5 gb with no issues?
Another thing, why does it not recycle the worker process when there is a System.OutOfMemoryException?
update: This application works perfectly fine on a 64bit windows server 2003 with IIS6.0. I have seen the max memory usage of it being around 700mb/worker process.
Update: The reason for high memory usage is XML processing using DOM. We are going to start work to fix that, but thats a long term plan. I just find it weird that it cannot go higher than 650 mb.


南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.