0

I have a 32 bit WCF service deployed on Windows 10(64 bit)/IIS 10. It is configured to run as 32 bit application in IIS setting. I assume that this wcf service should get full 4GB of memory but it is throwing out of memory exception at 2GB only. I checked 32 bit w3wp process is enabled with LARGEADDRESSAWARE flag.

Is it required to enable LARGEADDRESSAWARE flag for each wcf projects also or this flag is only required in w3wp process?

Can someone please guide me how my wcf service should get 4GB memory?

Thanks and Regards Nitesh Jain

  • 4-GB is the limit in theory, but in reality a 32 bit process starts to experience significant issues when memory usage goes beyond 1.5-GB. If your web app can go up to 2-GB, that's already good enough, so don't wish for more. Migrating to 64 bit is your only way out. – Lex Li Feb 08 '23 at 17:25
  • Thanks Lex but Microsoft and other Internet articles says that full 4GB memory should be available for 32 bit W3wp.exe on 64bit OS. However my wcf service memory is not growing beyond 2GB. It needs around 3 GB. My 32 bit windows service exe gets around 3.5 GB on same machine but 32 bit w3wp exe do not get more than 2 GB on same machine. Any idea why? – Nitesh Jain Feb 09 '23 at 05:24
  • You will have to show the exact words to support your claim of "full 4GB memory should be available for 32 bit W3wp.exe on 64bit OS". For decades I didn't recall anywhere that was mentioned by Microsoft in official documentation. There can be many ways to interpret sentences, but the actual observation you made is the most accurate that 4-GB or 3-GB is not usually achievable for IIS worker processes. Why IIS worker processes are special? Because they were designed to be different and more sensitive to high memory usage. – Lex Li Feb 09 '23 at 05:47
  • Thanks Lex again. I am referring to few articles like - https://social.msdn.microsoft.com/Forums/en-US/3f349c93-436f-413d-ab9d-2e1998d99060/questions-regarding-64-bit-windows-and-virtual-memory-allocations?forum=iissyswow https://accu.org/journals/overload/21/113/oldwood_1875/ https://learn.microsoft.com/en-us/windows/win32/memory/memory-limits-for-windows-releases?redirectedfrom=MSDN Best Regards – Nitesh Jain Feb 09 '23 at 05:57
  • You might notice that neither of them talks about w3wp.exe but general Windows processes. That makes them less useful in this thread. But "Useable memory" section from the former is actually quite related, that when the limit on paper is 2-GB or 3-GB or 4-GB, the actual limit you hit is always smaller. IIS team didn't aim to support the largest memory space as possible, because 64 bit is clearly the way to go when you want more memory. Keep in mind high performance web apps on IIS even in 64 bit should keep memory footprint as small as possible, different from things like SQL Server. – Lex Li Feb 09 '23 at 06:26
  • Hi Lex, Thanks again for your help. So can I conclude that 32bit w3wp .exe process will never allow memory to grow beyond 2GB on 64 bit OS? – Nitesh Jain Feb 09 '23 at 08:31

0 Answers0