バージョンアップ時に「待ち操作がタイムアウトになりました。」エラーが発生する

? Question

Orchestratorのバージョンアップでインストーラー実行時に以下のエラーが出力されました。

System.Exception: Migration failed: An exception occurred while initializing the database. See the InnerException for details.
System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details.
—> System.Data.Entity.Infrastructure.CommitFailedException: An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded or failed on the database server. See the inner exception and Handling transaction commit failures - EF6 | Microsoft Learn for more information.
—> Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
—> System.ComponentModel.Win32Exception (258): 待ち操作がタイムアウトになりました。

? Answer

原因

SQL Serverへの通信がタイムアウトしているように見受けられます。SQL Serverでパフォーマンスが低下していると、このエラーが発生する可能性があります。

解決策

バージョンアップ前にSQL Serverでパフォーマンスが低下する原因の解消をお試しください。

<考えられる原因の例>

・ディスク容量の逼迫

・インデックス断片化が進んでいる

・リソース(CPU、メモリ、またはネットワーク帯域幅等)不足

特に、Logsテーブルなどログデータが多い状態でバージョンアップを実施されると、負荷がかかりバージョンアップに失敗します。
そのためログデータが多い場合には、データの削除もご検討ください。

ご参考までに、バージョンアップ時の目安としてLogsテーブルのレコード数が200万件を超えるとエラーが発生しやすいです。

参考:
ログストレージ

ー抜粋ー
SQL データベースのパフォーマンスはロボットのログが 200 万に達すると低下し始め、600 万のしきい値に達すると大幅に低下します。パフォーマンスが低下するとログの検索が遅くなり、オートメーションのパフォーマンスに影響が出ます。