複数のサードパーティ システムと統合する Windows Azure アプリケーション (Lokad.CQRS アーキテクチャ) があります。これらの統合の 1 つが mySQL で行われます。すべて順調に進んでいましたが、最近、Windows Azure アプリケーションが接続できない mySQL データベースが 1 つあり、タイムアウトが発生しました。
関連するスタック トレースは次のとおりです。
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 経由で接続しているときに確認します)。
- ターゲット DB との統合は、ローカルの Azure Dev Fabric から適切に機能します。
- Windows Azure での問題は、ブースのプールされた接続とプールされていない接続で発生します。
- TCP/IP、通常のポート、SSL なし。
- この操作の接続タイムアウトは十分な長さです - 5 秒で、継続的に失敗します (ただし、NE DC から遠く離れていない Azure 以外のマシンからは常に成功します)。
Oracle、MS SQL、mySQL、および PostgreSQL の接続は、さまざまなセットアップと構成 (Linux/Windows でホストされたデータベース サーバー) で、Windows Azure を介して Lokad.CQRS から機能しています。しかし、この特定の mySQL ケースは、私を完全に混乱させます。
問題の原因について何か推測はありますか?