Memory leak in Remote Desktop Configuration (SessionEnv) service on Domain Controllers

Copper Contributor

Hi,

 

I've just recently built-up two new Windows Server 2019 domain controllers (fully patched) to replace two older 2012 R2 domain controllers. Both domain controllers suffer the same memory leak with the Remote Desktop Configuration service (SessionEnv) consuming all memory of the course of a few days;  about 3GB it consumes alone.

 

I have a Windows Server 2019 RODC in our DMZ that was built at the same time that doesn't seem to have this problem.

 

Does anyone know where I could begin to troubleshoot such an issue? 

6 Replies
Hi,
does your "Windows Server 2019 RODC" and other Windows server 2019 have the same exact hardware? are they virtual servers?

Yeah, all the same VM configuration (VMware ESXI), except the writeable DC's have 6GB of RAM, where as the RODC has 4GB. Otherwise identical configuration.

I wonder if the same would happen in real hardware or on Hyper-V

@oldkingcole Interesting, thanks for the heads up. I'll have to give it a go and re-enable the Remote Desktop Configuration (SessionEnv) service on the domain controllers. Hopefully it'll do the trick.

Check the following script to understand the usage of users per session.
Recommending to set the paging file according to standard best practice.

Note: On a domain controller, its not really require RDS session host service until unless the server exposed for internal users to RDP multiple logons, else use the default 2 session without having the roles on DC

get-wmiobject win32_process |
select @{N='User';E={$_.getowner().user}}, WorkingSetSize |
group user |
select Name, @{N='CPU';E={($_.Group.WorkingSetSize | Measure-Object -Sum).Sum / 1Mb }}