Release Management – Exception when releasing large file with agent based template

Release Management, TFS


System.OutOfMemoryException when a release has a file of large size, in agent based deployment. When the exception happens Release Management Server App pool and its worker process on the server (w3wp) crashes and the release fails.

Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)

at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)


· Release Management Server 2013 above

· Agent based deployment, that tries to deploy files with large file size

· The server that you are deploying to has drop location access set to “through Release Management Server over HTTP(S)”

In my repro I was able to hit this exception with file size larger than approximately 130 mbs. This may vary to some extent from one environment to another, depending on a few factors like page file size.




This is due to a limitation in the file size that can be transferred over https or http via Release Management. RM worker process being 32 bit is unable to handle files of large size and copy it over to the agent server.


The work around of fixing this issue would be to either split the files into smaller chunks and release them or make the drop location access set to “Directly using UNC Path”

Setting the access to using UNC path may need the respective ports opened on the agent machine and the build drop location. We should also ensure that the agent account has access to the drop location. Also if you are deploying to a machine with no trust, we should ensure the shadow account is present on the drop location server and has permissions on it.

Content created by – Venkata Narasimhan
Content reviewed by – Romit Gulati