0

我们有一个与多个第 3 方系统集成的 Windows Azure 应用程序(Lokad.CQRS 架构)。其中一种集成发生在 mySQL 上。一切都很顺利,但最近我们有一个 Windows Azure 应用程序无法连接的 mySQL 数据库,导致超时。

这是相关的堆栈跟踪:

System.TimeoutException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> 
System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. --->
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
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 MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
--- End of inner exception stack trace ---
at MyNetworkStream.HandleOrRethrowException(Exception e)
at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32  offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlConnection.Open()

重要亮点:

  • 目标数据库可从 Windows Azure 访问(通过 MySQL Workbench 连接时使用端口转发进行验证);
  • 与目标数据库的集成在本地 Azure Dev Fabric 中正常工作;
  • Windows Azure 上的问题发生在展位池连接和非池连接。
  • TCP/IP,普通端口,无 SSL;
  • 此操作的连接超时足够大 - 5 秒,并且它连续失败(但总是在距离 NE DC 不远的非 Azure 机器上成功)

我们有 Oracle、MS SQL、mySQL 和 PostgreSQL 连接,通过 Lokad.CQRS 在 Windows Azure 上以各种设置和配置(Linux/Windows 托管的数据库服务器)工作。但是这个特定的 mySQL 案例完全让我感到困惑。

关于可能导致问题的任何猜测?

4

2 回答 2

0

解决方案:

由于某种原因,Azure Production Fabric 为连接到目标数据库增加了太多延迟,它总是超时。来自欧洲附近机器的相同连接从未中断连接超时。

增加这种特定情况的连接超时(增加 5 倍)确实解决了这个问题,而不会给分布式系统的其余部分增加太多风险。

问题可能出在 NE DC 的网络配置、路由器故障或其他问题上。

于 2011-02-02T11:08:26.777 回答
0

我只是想问你一堆问题,因为我们想跟踪这个问题并帮助确保我们在 Windows Azure 上运行的 oss 应用程序没有问题。如果您没有看到,请告诉我。

Jas Sandhu,@jassand 互操作性战略团队 http://interoperabilitybridges.com http://blogs.msdn.com/interoperability

于 2011-02-02T19:57:45.110 回答