Relative Content

Tag Archive for c#impersonationtpl-dataflow

TPL Dataflow: Running a pipeline *while impersonated* leaks millions of handles

My Winforms app was consistently crashing to desktop on a large TPL Dataflow pipeline operation. This wasn’t caught by the normal try/catch. Only when I put a try/catch at the outermost Program.cs/Main() was I able to catch it: Unhandled Exception: System.Security.SecurityException: Insufficient system resources exist to complete the requested service. Note that this was on a box with 384GB RAM and 56 logical processors.