Seaquel
SQL Server error code

SQL Server error 4221

SQL Server raises error 4221 at severity 16, which marks a problem with the query or data that you can correct.

Login to read-secondary failed due to long wait on 'HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING'. The replica is not available for login because row versions are missing for transactions that were in-flight when the replica was recycled. The issue can be resolved by rolling back or committing the active transactions on the primary replica. Occurrences of this condition can be minimized by avoiding long write transactions on the primary.
Msg4221
Severity16
Group4000–4999

Source: Database Engine events and errors