2011-02-01 62 views
0

我們有一個與多個第三方系統集成的Windows Azure應用程序(Lokad.CQRS體系結構)。其中一個集成發生在mySQL上。一切都很順利,但最近我們有一個Windows Azure應用程序無法連接的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工作臺連接);
  • 與目標數據庫的集成可以從Local Azure Dev Fabric正常工作;
  • Windows Azure上的問題發生在展臺池化和非池化連接上。
  • TCP/IP,普通端口,無SSL;
  • 此操作連接超時夠大 - 5秒鐘,它不斷地失敗(但始終從位於不遠處的NE DC非天青機成功)

我們的Oracle,MS SQL,MySQL的以及在各種設置和配置(Linux/Windows託管的數據庫服務器)上從Lokad.CQRS通過Windows Azure工作的PostgreSQL連接。但是這個特定的mySQL案例讓我感到困惑。

任何可能導致問題的猜測?

+0

你說你所使用的端口轉發,以確保天青可以談。你有沒有試圖直接從角色連接?也許使用RDP並驗證? – 2011-02-01 19:03:51

回答

0

解決方案:

出於某種原因,Azure的生產織物增加太多的等待時間連接到目標數據庫,它總是超時。來自歐洲附近機器的同一連接從未中斷連接超時。

增加此特定情況下的連接超時(至5x)確實解決了這種情況,而沒有爲分佈式系統的其餘部分增加太多的風險。

可能問題出在NE DC的網絡配置,故障路由器等等。

0

我剛剛讓你問你一堆問題,因爲我們想跟蹤這個問題,並幫助確保我們在Windows Azure上運行的oss應用程序沒有問題。讓我知道你是否看不到它。

雅桑德,@jassand 互操作性戰略團隊 http://interoperabilitybridges.com http://blogs.msdn.com/interoperability