エラーコードポータル
SQLiteSQLiteエラーコード

SQLITE_PROTOCOL

protocol

別表記: 15

コード SQLITE_PROTOCOL · SQLiteが報告した問題です。

SQLITE_PROTOCOL 結果コードは、SQLite で使用されるファイル ロック プロトコルに問題があることを示します。 SQLITE_PROTOCOL エラーは現在、WAL モードを使用し、新しいトランザクションを開始しようとした場合にのみ返されます。 2 つの別々のデータベース接続の両方が WAL モードで同時にトランザクションを開始しようとすると、競合状態が発生する可能性があります。レースの敗者は後退し、少し遅れて再挑戦します。同じ接続が数秒間にわたって何十回もロック競合に負けた場合、最終的には諦めて SQLITE_PROTOCOL を返します。 SQLITE_PROTOCOL エラーが実際に発生するのは、非常にまれであり、多くの個別のプロセスがすべて同じデータベースに書き込むために激しく競合している場合にのみ発生します。

Google Translate · 自動翻訳です。専門用語や適用条件は英語の原文で確認してください。

The SQLITE_PROTOCOL result code indicates a problem with the file locking protocol used by SQLite. The SQLITE_PROTOCOL error is currently only returned when using WAL mode and attempting to start a new transaction. There is a race condition that can occur when two separate database connections both try to start a transaction at the same time in WAL mode. The loser of the race backs off and tries again, after a brief delay. If the same connection loses the locking race dozens of times over a span of multiple seconds, it will eventually give up and return SQLITE_PROTOCOL. The SQLITE_PROTOCOL error should appear in practice very, very rarely, and only when there are many separate processes all competing intensely to write to the same database.

トラブルシューティング・診断リンク

まず、文書の製品・バージョン・発生環境が現在の状況と一致しているか確認してください。

この項目には公式のコード参考文書のみを掲載しています。個別の解決手順は検証していません。