Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# / wpf/ xaml changing culture (language) at runtime Pin
Gerry Schmitz14-Jul-21 5:20
mveGerry Schmitz14-Jul-21 5:20 
QuestionN-Tier best practices when using in MVC application Pin
Member 949196213-Jul-21 13:33
Member 949196213-Jul-21 13:33 
AnswerRe: N-Tier best practices when using in MVC application Pin
Gerry Schmitz14-Jul-21 5:14
mveGerry Schmitz14-Jul-21 5:14 
QuestionExperiencing Memory Leak and unable to Handle it with GC.Collect() Pin
rahulgorai13-Jul-21 7:35
rahulgorai13-Jul-21 7:35 
AnswerRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
Dave Kreskowiak13-Jul-21 9:41
mveDave Kreskowiak13-Jul-21 9:41 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
rahulgorai14-Jul-21 2:03
rahulgorai14-Jul-21 2:03 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
Dave Kreskowiak14-Jul-21 4:16
mveDave Kreskowiak14-Jul-21 4:16 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
jschell17-Jul-21 10:37
jschell17-Jul-21 10:37 
rahulgorai wrote:
and the system crashes after few minutes.


That isn't a very clear statement.

In C# AppDomains exit when a OutOfMemory exception (OOM) occurs. So the 'system' in this case would mean you have one AppDomain and you are actually seeing an OOM and not guessing about what the exit is.

There are two general causes for this sort of error.
1. Your general, and complex, processing is very slowly leaking somewhere.
2. You have some very specific code, and when it runs it causes the problem.
3. You are not leaking anything. Your processing is just using more memory than what is available.
4. You have a problem with Large Objects.

For 2 the stack trace of the OOM will often reveal this. However the nature of the cause of the OOM might mean that you need to collect more than a couple of these to see the problem.

Problem 3 occurs because the VM has been limited. This can specifically happen when running in IIS. But can also occur for other reasons including the way the OS is set up.

For 1 you just need to dig in and start looking for incorrect things such as collections that keep adding the same object (duplicates) rather than removing/replacing anything. Note that with a 64 bit system and without limits from other sources this should be a rare occurrance.

For 4 you are going to have a different problem. The Large Object Heap is a problem due to the way that that is specifically implemented. It is impacted in the same way as others by limits placed on the application but can occur sooner. There is no quick, and easy way to explain it but if you are doing work anywhere in your application that uses memory streams and/or large allocations then those are going to be the problem areas. Basically anything over 80k freezes memory and puts large unmovable holes in the heap, which by themselves can lead to OOMs. Fixing it means to stop doing memory streams and/or large memory allocations.
Question.Tag File Pin
f6112-Jul-21 19:44
f6112-Jul-21 19:44 
AnswerRe: .Tag File Pin
Victor Nijegorodov12-Jul-21 20:38
Victor Nijegorodov12-Jul-21 20:38 
AnswerRe: .Tag File Pin
Ralf Meier12-Jul-21 20:56
mveRalf Meier12-Jul-21 20:56 
AnswerRe: .Tag File Pin
OriginalGriff12-Jul-21 21:18
mveOriginalGriff12-Jul-21 21:18 
AnswerRe: .Tag File Pin
Eddy Vluggen13-Jul-21 0:18
professionalEddy Vluggen13-Jul-21 0:18 
GeneralRe: .Tag File Pin
harold aptroot13-Jul-21 7:45
harold aptroot13-Jul-21 7:45 
AnswerRe: .Tag File Pin
Dave Kreskowiak15-Jul-21 8:25
mveDave Kreskowiak15-Jul-21 8:25 
Questionusing all drives Pin
Mr Shah 411-Jul-21 0:39
Mr Shah 411-Jul-21 0:39 
AnswerRe: using all drives Pin
OriginalGriff11-Jul-21 1:23
mveOriginalGriff11-Jul-21 1:23 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 1:33
Mr Shah 411-Jul-21 1:33 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 1:40
mveOriginalGriff11-Jul-21 1:40 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 1:45
Mr Shah 411-Jul-21 1:45 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 1:51
mveOriginalGriff11-Jul-21 1:51 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 1:56
Mr Shah 411-Jul-21 1:56 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 2:21
mveOriginalGriff11-Jul-21 2:21 
GeneralRe: using all drives Pin
Richard MacCutchan11-Jul-21 2:45
mveRichard MacCutchan11-Jul-21 2:45 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 3:12
mveOriginalGriff11-Jul-21 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.