jgroups消息大小大于最大bundle? 不正常分片?

问题描述 投票:1回答:2

[ERROR] [2014-08-28 07:09:17.100]向集群发送消息失败(216081字节):java.lang.Exception: message size (216081) is greater than max bundling size (200000). 在FRAG和TP中正确设置frag和TP的fragmentationbundle大小,原因: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将消息拆开,这是为什么呢,我漏掉了什么?

xml configuration jgroups
2个回答
1
投票

这不是FRAG2的问题--JGroups内部的某个地方产生了过长的消息。请看 JGRP-1868


0
投票

这是一个bug,在Jgroup 3.6.5上可以修复。https:/issues.redhat.combrowseJGRP-1939?workflowName=GIT+Pull+Request+workflow+&stepId=4。

以下代码在3.6.5版本中被删除。

protected void checkLength(long len) throws Exception { if(len > max_bundle_size) throw new Exception("消息大小(" + len + ")大于最大捆绑大小(" + max_bundle_size + ")。在FRAGFRAG2和TP中正确设置fragmentationbundle大小"); }。

© www.soinside.com 2019 - 2024. All rights reserved.