问题描述
项目最近准备做集群,涉及到缓存企业级数据的问题,方案适用的是jbosscache,服务器为weblogic,jdk为1.4现在遇到的问题是:涉及到多用户并发修改的情况就出现卡死的问题,等很长一段时间才能恢复正常。以下为配置文件,请指教<server><classpathcodebase="./lib"archives="jboss-cache.jar,jgroups.jar"/><mbeancode="org.jboss.cache.TreeCache"name="jboss.cache:service=TreeCache"><depends>jboss:service=Naming</depends><depends>jboss:service=TransactionManager</depends><!--ConfiguretheTransactionManagerDummyTransactionManagerLookupGenericTransactionManagerLookupBatchModeTransactionManagerLookuporg.jboss.cache.GenericTransactionManagerLookup--><attributename="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute><!--锁定节点隔离级别(ignoredifNodeLockingSchemeattributesettoOPTIMISTICvalue)Isolationlevel:SERIALIZABLEREPEATABLE_READ(default)READ_COMMITTEDREAD_UNCOMMITTEDNONE--><attributename="IsolationLevel">REPEATABLE_READ</attribute><!--节点锁Nodelockingscheme:OPTIMISTIC:lowerperforment,hightcpuPESSIMISTIC(default):hightperforment,butmaybedead-lock--><attributename="NodeLockingScheme">PESSIMISTIC</attribute><!--ThisJIRAwillrestoretheoldbehaviorforthepessimisticlockingusecase.AnewcacheconfigurationflagLockParentForChildInsertRemovewillbeadded.Ifsettofalse,the1.4.0.SP1behaviorofonlyrequiringtheRLwillberestored.Thedefaultvalueoftheflagwillbefalse.<attributename="LockParentForChildInsertRemove">true</attribute>--><!--ValidmodesareLOCALREPL_ASYNCREPL_SYNCINVALIDATION_ASYNCINVALIDATION_SYNC--><attributename="CacheMode">REPL_SYNC</attribute><!--Justusedforasyncrepl:useareplicationqueue--><attributename="UseReplQueue">false</attribute><!--Replicationintervalforreplicationqueue(inms)--><attributename="ReplQueueInterval">0</attribute><!--Maxnumberofelementswhichtriggerreplication--><attributename="ReplQueueMaxElements">0</attribute><!--Nameofcluster.Needstobethesameforallclusters,inordertofindeachother--><attributename="ClusterName">imep1-cluster</attribute><!--JGroupsprotocolstackproperties.CanalsobeaURL,e.g.file:/home/bela/default.xml<attributename="ClusterProperties"></attribute>--><attributename="ClusterConfig"><config><!--UDP:ifyouhaveamultihomedmachine,setthebind_addrattributetotheappropriateNICIPaddress,e.gbind_addr="192.168.0.2"--><!--UDP:OnWindowsmachines,becauseofthemediasensefeaturebeingbrokenwithmulticast(evenafterdisablingmediasense)settheloopbackattributetotrue--><!--ip_ttl="2"loopback="false"bind_addr="10.70.85.91"224.0.0.145588enable_bundling="false"discard_incompatible_packets="false"--><UDPmcast_addr="224.0.0.1"mcast_port="45566"tos="8"ucast_recv_buf_size="20000000"ucast_send_buf_size="640000"mcast_recv_buf_size="25000000"mcast_send_buf_size="640000"loopback="false"discard_incompatible_packets="true"max_bundle_size="64000"max_bundle_timeout="30"use_incoming_packet_handler="false"use_outgoing_packet_handler="false"ip_ttl="2"down_thread="false"up_thread="false"enable_bundling="true"bind_addr="10.70.85.90"/><PINGtimeout="2000"down_thread="false"up_thread="false"num_initial_members="3"/><MERGE2max_interval="30000"down_thread="false"up_thread="false"min_interval="10000"/><FD_SOCKdown_thread="false"up_thread="false"/><FDtimeout="10000"max_tries="5"down_thread="false"up_thread="false"shun="true"/><VERIFY_SUSPECTtimeout="1500"down_thread="false"up_thread="false"/><pbcast.NAKACKmax_xmit_size="60000"use_mcast_xmit="false"gc_lag="0"retransmit_timeout="300,600,1200,2400,4800,8800"down_thread="false"up_thread="false"discard_delivered_msgs="true"/><UNICASTtimeout="30,100,500,1000,4400,6000,8000,12000"down_thread="false"up_thread="false"/><pbcast.STABLEstability_delay="1000"desired_avg_gossip="50000"down_thread="false"up_thread="false"max_bytes="400000"/><VIEW_SYNCavg_send_interval="60000"down_thread="false"up_thread="false"/><pbcast.GMSprint_local_addr="true"join_timeout="3000"down_thread="false"up_thread="false"join_retry_timeout="2000"shun="true"use_flush="true"flush_timeout="5000"view_ack_collection_timeout="7000"view_bundling="true"/><FCmax_credits="2000000"down_thread="false"up_thread="false"min_threshold="0.10"/><!--FRAG2:分块传送协议--><FRAG2frag_size="60000"down_thread="false"up_thread="false"/><!--20000--><!--<pbcast.STREAMING_STATE_TRANSFERdown_thread="false"up_thread="false"use_flush="true"use_reading_thread="true"/>--><pbcast.STATE_TRANSFERdown_thread="false"up_thread="false"/><pbcast.FLUSHdown_thread="false"up_thread="false"/></config></attribute><!--WhetherornottofetchstateonjoiningaclusterNOTEthisusedtobecalledFetchStateOnStartupandhasbeenrenamedtobemoredescriptive.--><attributename="FetchInMemoryState">true</attribute><!--Themaxamountoftime(inmilliseconds)wewaituntiltheinitialstate(ie.thecontentsofthecache)areretrievedfromexistingmembersinaclusteredenvironment--><attributename="InitialStateRetrievalTimeout">95000</attribute><attributename="StateTransferTimeout">95000</attribute><attributename="MethodCallTimeout">95000</attribute><!--Numberofmillisecondstowaituntilallresponsesforasynchronouscallhavebeenreceived.--><attributename="SyncReplTimeout">90000</attribute><!--Maxnumberofmillisecondstowaitforalockacquisition--><attributename="LockAcquisitionTimeout">102000</attribute><!--Nameoftheevictionpolicyclassorg.jboss.cache.aop.eviction.AopLRUPolicy<attributename="EvictionPolicyClass">org.jboss.cache.aop.eviction.AopLRUPolicy</attribute>--><!--驱逐策略:管理jbosscache内存--><attributename="EvictionConfig"><config><attributename="wakeUpIntervalSeconds">10</attribute><!--Thisdefaultsto200000ifnotspecified--><attributename="eventQueueSize">100000</attribute><!--NameoftheDEFAULTevictionpolicyclass.--><attributename="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute><!--Cachewidedefault--><regionname="/_default_"><attributename="maxNodes">8000</attribute><attributename="timeToLiveSeconds">0</attribute><!--<attributename="minTimeToLiveSeconds">150</attribute><attributename="maxAgeSeconds">250</attribute>--></region><!--overridepolicyusedforthisregion--><regionname="/org/jboss/data"policyClass="org.jboss.cache.eviction.LRUPolicy"><attributename="maxNodes">50000</attribute><attributename="minTimeToLiveSeconds">150</attribute><attributename="maxAgeSeconds">250</attribute><attributename="timeToLiveSeconds">0</attribute></region><!--Weexpectalotofeventsforthisregion,sooverridethedefaulteventqueuesize--><regionname="/org/jboss/test/data"eventQueueSize="500000"><attributename="maxNodes">60000</attribute><attributename="minTimeToLiveSeconds">150</attribute><attributename="maxAgeSeconds">250</attribute><attributename="timeToLiveSeconds">0</attribute></region></config></attribute><!--Indicatewhethertouseregionbasedmarshallingornot.Setthistotrueifyouarerunningunderascopedclassloader,e.g.,insideanapplicationserver.Defaultis"false".--><attributename="UseRegionBasedMarshalling">true</attribute><attributename="FetchStateOnStartup">true</attribute></mbean></server>
解决方案
解决方案二:
该回复于2009-08-28 13:37:34被版主删除
解决方案三:
<attributename="CacheMode">REPL_SYNC</attribute>改为异步看看