Memory/Handle Leak with MSXML/C++ 32bit Windows Serverice on Windows Server 2012 R2 64 bit

264 Views Asked by At

We have a 32 bit legacy multi-threaded C++ Windows Service that uses Msxml2.ServerXMLHTTP.3.0 instance to send a message to one or more remote computer/host/endpoint.

We recently migrated this service from a Windows 2008 Standard (32bit) OS to a Windows 2012 R2 64bit OS. The service still runs in 32bit mode.

What has been noticed is that things work fine if the remote host is online. However if the remote host goes offline then the memory and handle count grows uncontrollably till the service eventually crashes. If the remote host comes online or message is exchanged with any other host then the handle count and memory starts reducing back to normal and start going back up if any single host/endpoint (remote computer) goes offline.

What has been also noticed is that the IServerXMLHTTPRequest::Send() method timeout on Windows 2012 takes much longer (3-4 seconds) when compared to Windows 2008 (less than 200ms). The same service works fine on Windows 2008 64 bit but has issues with Windows 2012 R2.

Looking at netstat we see 2 SYN_SENT requests for the offline endpoint the first SYN_SENT state takes about 3-4 seconds to timeout. The same is much faster in 2008.

Any pointers would be much appreciated.

Thanks!!

0

There are 0 best solutions below