我正在对RabbitMQ使用MassTransit。在大多数情况下,它运行良好,但是一段时间后,消费者开始抛出S-FAULT警告:
MassTransit.Messages Warning: 0 : S-FAULT rabbitmq://<redacted>/iemr_ExistingRowCheck 62560000-56b4-0050-b40b-08d69864ff75 ieMR.BulkCopy.MissingRowImport.Queues.ExistingRowCheck
An established connection was aborted by the software in your host machine, System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the
software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at RabbitMQ.Client.Impl.SocketFrameHandler.Write(Byte[] buffer)
at RabbitMQ.Client.Impl.Command.TransmitAsFrameSet(Int32 channelNumber, Connection connection)
at RabbitMQ.Client.Impl.SessionBase.Transmit(Command cmd)
at RabbitMQ.Client.Impl.ModelBase.BasicPublish(String exchange, String routingKey, Boolean mandatory, IBasicProperties basicProperties, Byte[] body)
at MassTransit.RabbitMqTransport.Contexts.RabbitMqModelContext.PublishAsync(String exchange, String routingKey, Boolean mandatory, IBasicProperties basicProperties, Byte[] body)
at MassTransit.RabbitMqTransport.Contexts.RabbitMqModelContext.<>c__DisplayClass12_0.<MassTransit.RabbitMqTransport.ModelContext.BasicPublishAsync>b__1()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.RabbitMqTransport.Contexts.RabbitMqModelContext.<MassTransit-RabbitMqTransport-ModelContext-BasicPublishAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.Internals.Extensions.TaskExtensions.<WithCancellation>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MassTransit.RabbitMqTransport.Transport.RabbitMqSendTransport.<>c__DisplayClass7_0`1.<<MassTransit-Transports-ISendTransport-Send>b__1>d.MoveNext()
我可以忽略这些警告吗?
我正在使用MassTransit 5.3.1.0,并在Erlang 20.3上针对RabbitMq 3.7.5匹配了MassTransit.RabbitMqTransport。
答案 0 :(得分:0)
我通常将服务器上的网络错误扔进位桶中。
这意味着有状态防火墙断开了(死)连接,或者另一端的IP地址无法以您的主机OS可以快速检测到的方式到达。
答案 1 :(得分:0)
感谢您查看RabbitMQ日志的建议。
日志中充满了类似以下内容的行:
2019-02-23 11:01:35.254 [info] <0.280.0> vm_memory_high_watermark set. Memory used:1724121088 allowed:1717798502
2019-02-23 11:01:35.254 [warning] <0.278.0> memory resource limit alarm set on node 'rabbit@THHS-D-RABTMQ01'.
**********************************************************
*** Publishers will be blocked until this alarm clears ***
**********************************************************
2019-02-23 11:02:22.596 [info] <0.280.0> vm_memory_high_watermark clear. Memory used:1714683904 allowed:1717798502
增加rabbitmq.conf
中的内存高水位标记似乎可以解决问题:
vm_memory_high_watermark.relative = 0.8
我将要求服务器团队在星期一增加这台计算机上的内存。