jgroups邮件大小是否大于最大捆绑?没有正确分割?

时间:2014-09-18 15:31:59

标签: xml configuration jgroups

  

[ERROR] [2014-08-28 07:09:17.100]无法向群集发送消息(216081字节):java.lang.Exception:消息大小(216081)大于最大捆绑大小(200000)。正确设置FRAG和TP中的碎片/包大小,原因:null - protocols.TCP [http-apr-8080-exec-10] [48488852 ms]

在对配置进行一些研究之后

<config xmlns="urn:org:jgroups"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.1.xsd">
<TCP bind_port="${ehcacheDistributed.jgroups.bindPort}"
     bind_addr="NON_LOOPBACK"
     loopback="false"
     recv_buf_size="${tcp.recv_buf_size:20M}"
     send_buf_size="${tcp.send_buf_size:640K}"
     discard_incompatible_packets="true"
     max_bundle_size="200K"
     max_bundle_timeout="30"
     enable_bundling="true"
     use_send_queues="true"
     sock_conn_timeout="300"

     timer_type="new"
     timer.min_threads="4"
     timer.max_threads="10"
     timer.keep_alive_time="3000"
     timer.queue_max_size="500"

     thread_pool.enabled="true"
     thread_pool.min_threads="1"
     thread_pool.max_threads="10"
     thread_pool.keep_alive_time="5000"
     thread_pool.queue_enabled="false"
     thread_pool.queue_max_size="100"
     thread_pool.rejection_policy="discard"

     oob_thread_pool.enabled="true"
     oob_thread_pool.min_threads="1"
     oob_thread_pool.max_threads="8"
     oob_thread_pool.keep_alive_time="5000"
     oob_thread_pool.queue_enabled="false"
     oob_thread_pool.queue_max_size="100"
     oob_thread_pool.rejection_policy="discard"/>

<TCPPING timeout="3000"
         initial_hosts="${ehcacheDistributed.jgroups.tcpping.initialhosts}"
         port_range="1"
         num_initial_members="10"/>
<MERGE2  min_interval="10000"
         max_interval="30000"/>
<FD_SOCK/>
<FD timeout="35000" max_tries="6" />
<VERIFY_SUSPECT timeout="1500"  />
<BARRIER />
<pbcast.NAKACK2 use_mcast_xmit="false"
               discard_delivered_msgs="true"/>
<UNICAST />
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
               max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"

            view_bundling="true"/>
<UFC max_credits="2M"
     min_threshold="0.4"/>
<MFC max_credits="2M"
     min_threshold="0.4"/>
<FRAG2 frag_size="60K"  />
<!--RSVP resend_interval="2000" timeout="10000"/-->
<pbcast.STATE_SOCK/>
</config>

我们正在使用jgroups 3.1.0,看来jgroups并没有正确地使用FRAG2将信息分开,为什么会这样?我错过了什么?

2 个答案:

答案 0 :(得分:1)

这不是FRAG2的错 - 在JGroups内部的某个地方产生的消息太长了。见JGRP-1868

答案 1 :(得分:0)

这是一个错误,Jgroup 3.6.5上提供了修复程序 https://issues.redhat.com/browse/JGRP-1939?workflowName=GIT+Pull+Request+workflow+&stepId=4

以下代码在3.6.5版本中已删除:

受保护的void checkLength(long len)引发异常 { 如果(len> max_bundle_size) 抛出新的Exception(“消息大小(” + len +“)大于最大捆绑大小(” + max_bundle_size + “)。正确设置FRAG / FRAG2和TP中的碎片/束大小”); }