Click here to Skip to main content
15,173,151 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# / wpf/ xaml changing culture (language) at runtime Pin
Gerry Schmitz14-Jul-21 6:20
mveGerry Schmitz14-Jul-21 6:20 
QuestionN-Tier best practices when using in MVC application Pin
Member 949196213-Jul-21 14:33
MemberMember 949196213-Jul-21 14:33 
AnswerRe: N-Tier best practices when using in MVC application Pin
Gerry Schmitz14-Jul-21 6:14
mveGerry Schmitz14-Jul-21 6:14 
QuestionExperiencing Memory Leak and unable to Handle it with GC.Collect() Pin
rahulgorai13-Jul-21 8:35
Memberrahulgorai13-Jul-21 8:35 
AnswerRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
Dave Kreskowiak13-Jul-21 10:41
mveDave Kreskowiak13-Jul-21 10:41 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
rahulgorai14-Jul-21 3:03
Memberrahulgorai14-Jul-21 3:03 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
Dave Kreskowiak14-Jul-21 5:16
mveDave Kreskowiak14-Jul-21 5:16 
GeneralRe: Experiencing Memory Leak and unable to Handle it with GC.Collect() Pin
jschell17-Jul-21 11:37
Memberjschell17-Jul-21 11: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 20:44
Memberf6112-Jul-21 20:44 
AnswerRe: .Tag File Pin
Victor Nijegorodov12-Jul-21 21:38
MemberVictor Nijegorodov12-Jul-21 21:38 
AnswerRe: .Tag File Pin
Ralf Meier12-Jul-21 21:56
professionalRalf Meier12-Jul-21 21:56 
AnswerRe: .Tag File Pin
OriginalGriff12-Jul-21 22:18
mveOriginalGriff12-Jul-21 22:18 
AnswerRe: .Tag File Pin
Eddy Vluggen13-Jul-21 1:18
professionalEddy Vluggen13-Jul-21 1:18 
GeneralRe: .Tag File Pin
harold aptroot13-Jul-21 8:45
Memberharold aptroot13-Jul-21 8:45 
AnswerRe: .Tag File Pin
Dave Kreskowiak15-Jul-21 9:25
mveDave Kreskowiak15-Jul-21 9:25 
Questionusing all drives Pin
Mr Shah 411-Jul-21 1:39
MemberMr Shah 411-Jul-21 1:39 
AnswerRe: using all drives Pin
OriginalGriff11-Jul-21 2:23
mveOriginalGriff11-Jul-21 2:23 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 2:33
MemberMr Shah 411-Jul-21 2:33 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 2:40
mveOriginalGriff11-Jul-21 2:40 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 2:45
MemberMr Shah 411-Jul-21 2:45 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 2:51
mveOriginalGriff11-Jul-21 2:51 
GeneralRe: using all drives Pin
Mr Shah 411-Jul-21 2:56
MemberMr Shah 411-Jul-21 2:56 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 3:21
mveOriginalGriff11-Jul-21 3:21 
GeneralRe: using all drives Pin
Richard MacCutchan11-Jul-21 3:45
mveRichard MacCutchan11-Jul-21 3:45 
GeneralRe: using all drives Pin
OriginalGriff11-Jul-21 4:12
mveOriginalGriff11-Jul-21 4: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.