ADF V2异常:无法从传输连接中读取数据:远程主机强行关闭了现有连接

时间:2018-09-06 02:27:45

标签: c# azure azure-storage azure-data-factory azure-batch

我在使用Azure Data Factory V2时遇到问题。我设计了一个自定义的Azure批处理服务(实际上它只是一个控制台)来计算我们的数据并生成报告。在此过程中,我需要分析许多巨大的表,并使用流来读写数据和结果。

问题是,如果我在登台环境中处理数据,这意味着较少的表装入和较少的数据,则可以正常工作。

此外,如果我在本地计算机或Azure虚拟机(通过远程桌面链接)中运行控制台,它们都可以在大约6个小时内正常工作。虽然在ADF v2上执行此过程需要48个小时,但出现此错误:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> Microsoft.WindowsAzure.Storage.StorageException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> 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.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at Microsoft.WindowsAzure.Storage.Core.ByteCountingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
   at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
   at Microsoft.Data.OData.Json.JsonReader.ReadInput()
   at Microsoft.Data.OData.Json.JsonReader.ParseStringPrimitiveValue(Boolean& hasLeadingBackslash)
   ....

此外,我检查了stdout.txt并没有激活分析过程,似乎在初始化(或执行订单/组操作)大表中的数据时它已经死了。

该过程在以下代码处失效:

ReportHelper.Users = user.OrderByDescending(u => u.Timestamp).GroupBy(p => p.Id, StringComparer.OrdinalIgnoreCase).ToDictionary(g => g.Key, g => g.First(), StringComparer.OrdinalIgnoreCase);

有人认为这是因为节点的内存不足,我在Azure门户上检查说VM的大小为“ standard_a1”。

问题是我无法更改节点上的任何内容。我该如何解决这个问题?

非常感谢您的帮助!

0 个答案:

没有答案