CefSharp.BrowserSubprocess.exe memory leak - cefsharp

CefSharp version 75.1.143.0 memory of CefSharp.BrowserSubprocess.exe is growing rapid far to 1GB.
Angular components are destroyed and removed from the DOM but the memory of CefSharp.BrowserSubprocess.exe
keep growing.
Any idea?

Related

ASP.NET Core 3.1 Unmanaged Memory

My development team is using ASP.NET Core 3.1.20 with Angular 10.2. We are seeing a large amount of unmanaged memory being consumed and never released. We are simulating load via a simple locust script with 200 concurrent users. I initially speculated that this was logic error in our code that was never releasing memory but I am not starting to wonder if it is something to do with how Microsoft manages memory. I have tried setting the false setting as well. This does help with overall memory but I can still expose the same problem regardless over time. I have verified that my code is purely managed code via ILDASM and PEVerify.
Any help is greatly appreciated
Application Memory

How to reduce memory consumption of a Qt program with CSS codes?

I am using Qt framework to develop a software to drive a robot arm. The program is working fine but it consumes a lot of memory( 2 - 3 Gb of RAM). I have fixed a memory leak but still problem is there.
I am using many CSS codes to modify graphical aspects of widgets. I noticed that CSS code consumes a lot of available memory.
Have you ever had this problem ?
Have you any idea to reduce memory usage?
Thanks

Diagnose a RAM usage spike on page load

When we launch our game in the AirConsole, the RAM usage jumps really high and we get an "Out of memory" error. The only way to actually test the game is to upload a Development build with exceptions enabled and the WebGL Memory Size set to 2047. That's the only scenario, when the game doesn't crash.
We used Chrome to monitor the RAM. When we launch the game in the AirConsole, the RAM gets heavily loaded (2 GB or so) and after the game loads, the RAM usage becomes much lower (about 1 GB).
I think it is directly connected to the huge JS file that we get, when we make a WebGL build, but that's only a guess.
How can we diagnose the problem and lower the RAM usage?
Well, you need to profile memory usage by the page with the tools a browser provides - just like you would do for a desktop application.
JavaScript Memory Profiling - Google Chrome
MemoryBug Firefox extension
Diagnosing memory problems in your webpages (Windows) - MSDN
They vary in sophistication, but are basically the same as in every other garbage-collected environment. They can be divided into two basic types:
rough data: general dynamics, snapshots (incl. on events), usage by entities (DOM,JS,plugins) - identify main hogs
fine data: GC statistics, object links - locate specific culprits

Freeing memory in QML after loading images

I'm new in using QtQuick apps, I wanted to ask about memory management, how can I free memory after loading images using Image item using QML ?
Memory management in QML is automatic. You are not supposed to do anything.
However, forcing JavaScript's garbage collection might sometimes help free some memory, as I myself have found the JS engine to be rather liberal with memory usage. You can do that by invoking gc()

ASP.Net: Finding the cause of OutOfMemoryExpcetions

I trying to track down the cause of an OutOfMemory for a website. This site has ~12,000 .aspx pages and the last time it crashed I captured a memory dump using adplus.
After some investigation I found a lot of heap fragmentation, there are around 100MB of Free blocks which can't be assigned. Digging deeper one of the Large Object Heaps is fragmented and the causes seems to be String interning as described [here][1]
Could this be caused by the number of pages in the site? As they are all compiled they sit in memory and by looking at the dump they are interned and PINNED which I think means they stick around for a while.
I would find this odd as there are many sites with more pages, but dynamic compilation could account for the growth in memory.
What other methods are there for finding the cause of the memory leak? I have tried to capture a dump using adplus in hang mode but this fails and the IIS worker process get recycled.
[1]: • Large Object Heap Fragmentation
Yep fragmentation is one of the reason because it will be more difficult to 'find' memory.
Some very known clues :
On a 32bit OS, your worker process can't exceed 2 GB in memory even if your system have more. An alternative is the /3GB switch (boot.ini file).
The likelihood of experiencing an OutOfMemoryException begins to increase dramatically when “Process\Virtual Bytes” is within 600 MB of the virtual address space limit (generally 2 GB), and secondly, tests have shown that “Process\Virtual Bytes” is often larger than “Process\Private Bytes” by no more than 600 MB
The CLR is allocating and handling the memory by blocks (64 MB from memory;)). It does not mean it use all this memory, it means one block will not be freed until one byte is used and it's how the memory become fragmented.
When the CLR can't allocate memory (new block needed), and it can't garbage collect or page some of the memory, OutOfMemoryException is going to happen in the best case or the server will be overloaded in the worst case.
About dynamic compilation, that's true but the most important is the <compilation debug="false" /> / <deployment retail=”true”/> switches. They turn on batch compilation which mean one DLL by directory (this is another point) and not one DLL per 'page' which cause virtual space fragmentation.
About one DLL by directory, even with batch compilation, more directories/sub-directories you have, more DLL you will have and more fragmented virtual address space you will have.
Personally, I use ANTS Memory Profiler to find memory issues.
There is a really good blog here by Tess Ferrandez that talks about memory issues and other types of debugging issues while developing ASP.NET applications.
One post in particular walks you through a tutorial to see if you have a leak. Its uses the nasty WinDBG, but she explains all the commands so you can get a clear picture of your used memory and it shows you exactly which objects are filling all the space.
I have used her site many times to diagnose memory leaks and other performance related problems.
I have also used tools like DebugDiag to help capture memory related issues and used its built in diagnostic tools to help find the problems.

Resources