by rco8786 · 2y ago · 0 comments
We found the underlying issue that caused memory pressure in the Gen2 region but the fix was to change some very fundamental aspects of the service and would need to have some significant refactoring. Since this was a legacy service (.net framework) that we were refactoring anyway to run in new .NET (5+), we decided to ignore the issue.
Instead we adjusted the GC to just never do the expensive Gen2 collections (GCLatencyMode) and moved the service to run on higher memory VMs. It would hit OOM every 3 days or so, so we just set instances to auto-restart once a day.
Then 1 year later we deployed the replacement for the legacy service and the problem was solved.
https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...
Then you just say terrorists were hiding inside…
What happens when it runs out of stack? It just resets the stack pointer back to the start.
If it's a fixed function synth, sometimes just allocating everything up front makes more sense.
It was a deliberate design choice that was surprisingly close to what the original article describes.