We have an large wisej web application in production. We have 2 servers (app and db) servers with Intel(R) Xeon(R) E-2224 CPU @ 3.40GHz, 3408 Mhz with 4 cores and 32 GB memory. We have about 100 users. The system works mainly with panels (user controls) and Windows to search users, accounts, licences, get parameters from user, displaying pdf reports, etc. The system works fine but after a few hours of operation send a error message “Insufficient memory”. After investigation and reading similar messages in this forum i realize then we have 2 problems:
Sincerely. I appreciate your kindly answer. Sorry for my english.
Ing. Edmundo Ríos Miranda.
Best would be to have a code review by Wisej guys.
Out-of-memory situations are not strictly Wisej problem, but they can point you to memory leaks and help improving session handling.
What you can do yourself:
During debugging, you can: (1) take a memory snapshot, (2) open a window, (3) do some operations, (4) close the window, (5) take another memory snapshot.
The Diagnostic Tools will show you all object created between the snapshots.
3. If really critical (like you are losing reputation and need a quick fix), you can (temporarily) force-run a garbage collection, until you resolve the issue.
Do not run GC as a permanent fix.
This should be called after a client disposes a window.
This will freeze all clients for ~1 second.
System.Runtime.GCSettings.LargeObjectHeapCompactionMode = Runtime.GCLargeObjectHeapCompactionMode.CompactOnce
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, True, True)
System.Threading.Thread.Sleep(100)
GC.WaitForPendingFinalizers()
System.Threading.Thread.Sleep(100)
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, True, True) ‘ collect dead objects
System.Threading.Thread.Sleep(100)
4. In your web.config, set something like
<configuration>
<runtime>
<gcServer enabled=”true” />
<gcConcurrent enabled=”true” />
<gcAllowVeryLargeObjects enabled=”true” />
<GCLOHThreshold enabled=”4194304″ />
</runtime>
</configuration>
5. Even you have 32 GB RAM, increase your paging file to be fixed-size 16 GB.
But better ask Wisej team for special support.
Please login first to submit.