Rebus を 0.71.4 から 0.75.2 にアップグレードした後の RabbitMq 接続の問題を解決するにはどうすればよいですか?
アクティビティを監視するための N 個のダッシュボード、ワークフローを制御するための 1 つのマネージャー、および作業を実行するための N 個のワーカーを備えた分散プロセッサのセットアップがあります。各コンポーネント間の通信は、RabbitMq を使用して管理されます。Rebus 0.75.2 にアップグレードするまで (RabbitMq.Client の 3.4.0.0 へのアップグレードを含む)、[Rebus 0.71.4 で] すべてがうまく機能しています。
マネージャーは、ワーカーに発行されるハートビート、ダッシュボードに発行される要求/応答監査メッセージ、ワーカーによって実行される作業を含むメッセージなど、複数の形式の通信を送信するため、最も複雑なコンポーネントです。このメッセージングはすべて同時に行われています。
ワーカーで長時間実行されているタスクによって作業が停滞するのを防ぐために、1 のプリフェッチを使用しています (ジョブの範囲は 1 秒から 5 分です)。
現在、マネージャー内での公開中に不規則な例外が発生しています。
2015-01-07 14:59:58.6205 | Error | An error occurred while rolling back the transaction! RabbitMQ.Client.Exceptions.AlreadyClosedException Already closed: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=504, text="CHANNEL_ERROR - unexpected command while processing 'tx.commit'", classId=60, methodId=40, cause= at RabbitMQ.Client.Impl.SessionBase.Transmit(Command cmd)
at RabbitMQ.Client.Impl.ModelBase.TransmitAndEnqueue(Command cmd, IRpcContinuation k)
at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Framing.Impl.Model.TxRollback()
at System.Action.Invoke()
at Rebus.Bus.TxBomkarl.RaiseDoRollback()
at Rebus.Bus.Worker.<TryProcessIncomingMessage>d__1d.MoveNext()
2015-01-07 14:59:58.6275 | Warn | User exception in Rebus 1 worker 1: Rebus.Bus.QueueCommitException: An exception occurred while attempting to commit the queue transaction ---> RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=504, text="CHANNEL_ERROR - unexpected command while processing 'tx.commit'", classId=60, methodId=40, cause=
at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply()
at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body)
at RabbitMQ.Client.Framing.Impl.Model.TxCommit()
at System.Action.Invoke()
at Rebus.Bus.TxBomkarl.RaiseDoCommit()
at Rebus.Bus.Worker.<TryProcessIncomingMessage>d__1d.MoveNext()
--- End of inner exception stack trace ---
at Rebus.Bus.Worker.<TryProcessIncomingMessage>d__1d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
at Rebus.Bus.RebusSynchronizationContext.Run()
at Rebus.Bus.Worker.MainLoop()
これらは、RabbitMq ログからのいくつかの関連エントリです。
=ERROR REPORT==== 7-Jan-2015::15:41:54 ===
Error on AMQP connection <0.680.0> ([::1]:59429 -> [::1]:5672, vhost: 'efs', user: 'efs.eod', state: running), channel 1:
{amqp_error,channel_error,"unexpected command while processing 'tx.commit'",
'basic.publish'}
=WARNING REPORT==== 7-Jan-2015::15:42:55 ===
closing AMQP connection <0.553.0> ([::1]:59421 -> [::1]:5672):
connection_closed_abruptly
RabitMq サーバー 3.3.5 および 3.4.3 に対してテストを行いました。
この動作は再現可能ですが、散発的です。そして、正しく機能する場合、通信は 0.71.4 のときよりもはるかに遅くなります。
これまでのところ、問題を単独で再現することはできませんでした。問題を診断するためのアドバイスをいただければ幸いです。