As a workaround, you may need to set out the Timeout and ReadWriteTimeout of the request to higher values, or set KeepAlive to false.
Big files uploading (WebException: The connection was closed unexpectedly)
Check more here :
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello All,
We have a custom activity (C# .Net code) which loads the data from application and create a CSV file which gets placed over the blob location. This Activity is triggered in ADF with the help of batch services.
This code code is working everywhere except in azure batch.
we have tried running the code on vs, via adf everywhere it is working but in batch getting this error
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.TlsStream.CallProcessAuthentication(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.OData.Client.HttpWebRequestMessage.GetResponse()
Can you please let us know what would be the cause?
As a workaround, you may need to set out the Timeout and ReadWriteTimeout of the request to higher values, or set KeepAlive to false.
Big files uploading (WebException: The connection was closed unexpectedly)
Check more here :
Hello All,
post raising the ticket with Microsoft, they informed it that while our code was executing the memory of VM was going till 100% due to which there was nothing to get store.
post their suggestion to create a new batch pool we were able to establish the connection.
and we were able to execute the activity.
Also, we were using sku '2012-r2-datacenter' whch was metioned by the Support team that is in verge of expiration, so we have created with '2022-datacenter'.