[JBoss jBPM] - invalid reference, performance, db access, etc...
by jstachera
I am working on web application and I found some problems with JbpmContext. There are some issues that I am not fully aware:
1. If I do not close the context no changes will be saved to the database.
2. If for example I will get some reference to jbpm object:
| TaskInstance taskInstance = context.getTaskInstance(wid);
|
and for some reason I close the context then from that time on the reference to taskInstance is invalid end every attempt to call some method leads to exception -> "context was closed" - or smth like that.
Therefore, when I create my TaskInstance Bean (actually JbpmWorkItem) in the constructor I initialize all the fields that are used by getters methods of the bean.
| public class JbpmWorkItem implements IWorkItem {
| static Log log = new Log();
| /**
| * session
| */
| JbpmDefSession session;
| /**
| * work item id
| */
| long workItemId;
| /**
| * process instance id
| */
| long processInstanceId;
| /**
| * process definition id
| */
| long processDefinitionId;
| /**
| * CurrentProcessObjectName
| */
| String currentProcessObjectName;
|
|
| /*
| * Task instance - actuall jbpm work item (task to do)
| */
|
| /** Cons
| * @param session - def session
| * @param wid - work item id
| * @throws JbpmAtflowException
| */
| public JbpmWorkItem(DefSession session, long wid) throws Exception {
| this.session = (JbpmDefSession)session;
| this.workItemId = wid;
| /* getContext() creates new context for logged user*/
| JbpmContext context = this.session.getContext();
| try {
| TaskInstance taskInstance = context.getTaskInstance(wid);
| processInstanceId = taskInstance.getToken().getProcessInstance().getId();
| processDefinitionId = taskInstance.getToken().getProcessInstance().getProcessDefinition().getId();
| currentProcessObjectName = taskInstance.getToken().getNode().getName();
| }
| catch (Exception e) {
| log.error("Could not create work item: " + wid + ", actor: " + session.getLoggedOnUser().getName());
| throw new JbpmAtflowException("Could not create work item: " + wid + ", actor: " + session.getLoggedOnUser().getName(), e);
| }
| finally {
| context.close();
| }
| }
|
and here is the question is it correct way ?
My purpose of doing that was to minimize the number of accesses to the database. Since If I put the code with creating new context and closing it in every getter method just to access jbpm object it will probably decrease the performance.
Am I right ? or Is Jbpm doing some caching so not every call to jbpm object method leads to database access to get the data ?
BR,
Jurek
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990420#3990420
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990420
18 years, 3 months
[Beginners Corner] - ERROR [NamingService] Could not start on port 1099
by vkokodyn
13:25:55,024 INFO [Server] Starting JBoss (MX MicroKernel)...
13:25:55,039 INFO [Server] Release ID: JBoss [Zion] 4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)
13:25:55,039 INFO [Server] Home Dir: C:\JBoss\jboss-4.0.3SP1
13:25:55,039 INFO [Server] Home URL: file:/C:/JBoss/jboss-4.0.3SP1/
13:25:55,039 INFO [Server] Patch URL: null
13:25:55,039 INFO [Server] Server Name: default
13:25:55,039 INFO [Server] Server Home Dir: C:\JBoss\jboss-4.0.3SP1\server\default
13:25:55,039 INFO [Server] Server Home URL: file:/C:/JBoss/jboss-4.0.3SP1/server/default/
13:25:55,039 INFO [Server] Server Temp Dir: C:\JBoss\jboss-4.0.3SP1\server\default\tmp
13:25:55,039 INFO [Server] Root Deployment Filename: jboss-service.xml
13:25:55,508 INFO [ServerInfo] Java version: 1.5.0_02,Sun Microsystems Inc.
13:25:55,508 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_02-b09,Sun Microsystems Inc.
13:25:55,508 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
13:25:56,274 INFO [Server] Core system initialized
13:25:59,211 INFO [WebService] Using RMI server codebase: http://kleynod:8083/
13:25:59,274 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
13:25:59,758 ERROR [NamingService] Could not start on port 1099
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:169)
at org.jnp.server.Main.initBootstrapListener(Main.java:316)
at org.jnp.server.Main.start(Main.java:267)
at org.jboss.naming.NamingService.startService(NamingService.java:221)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at org.jboss.system.ServiceController.start(ServiceController.java:446)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:595)
13:26:08,664 INFO [Embedded] Catalina naming disabled
13:26:09,820 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
13:26:09,820 INFO [Catalina] Initialization processed in 1047 ms
13:26:09,836 INFO [StandardService] Starting service jboss.web
13:26:09,836 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5
13:26:09,930 INFO [StandardHost] XML validation disabled
13:26:09,992 INFO [Catalina] Server startup in 172 ms
13:26:10,242 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
13:26:11,039 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
13:26:11,914 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=.../tmp/deploy/tmp4848jboss-ws4ee-exp.war/
13:26:12,195 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
13:26:12,664 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
13:26:17,461 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
13:26:19,867 INFO [MailService] Mail Service bound to java:/Mail
13:26:20,930 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
13:26:21,195 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
13:26:21,414 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
13:26:21,648 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
13:26:21,867 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
13:26:22,070 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
13:26:24,133 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
13:26:24,633 INFO [A] Bound to JNDI name: queue/A
13:26:24,648 INFO [B] Bound to JNDI name: queue/B
13:26:24,648 INFO [C] Bound to JNDI name: queue/C
13:26:24,648 INFO [D] Bound to JNDI name: queue/D
13:26:24,648 INFO [ex] Bound to JNDI name: queue/ex
13:26:24,695 INFO [testTopic] Bound to JNDI name: topic/testTopic
13:26:24,711 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
13:26:24,711 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
13:26:24,711 INFO [testQueue] Bound to JNDI name: queue/testQueue
13:26:24,804 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
13:26:24,929 INFO [DLQ] Bound to JNDI name: queue/DLQ
13:26:25,351 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
13:26:25,539 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MSSQLDS' to JNDI name 'java:MSSQLDS'
13:26:25,898 WARN [verifier] EJB spec violation:
Bean : Product
Method : public abstract ProductLocal create() throws CreateException
Section: 12.2.11
Warning: Each create(...) method in the entity bean's local home interface must have a matching ejbCreate(...) method in the entity bean's class.
13:26:25,898 ERROR [MainDeployer] Could not create deployment: file:/C:/JBoss/jboss-4.0.3SP1/server/default/deploy/EJBEntity.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:575)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy24.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:595)
13:26:25,961 INFO [TomcatDeployer] deploy, ctxPath=/HelloWeb, warUrl=.../tmp/deploy/tmp4904HelloWeb-exp.war/
13:26:26,289 INFO [TomcatDeployer] deploy, ctxPath=/SimpleWeb, warUrl=.../tmp/deploy/tmp4905SimpleWeb-exp.war/
13:26:26,586 INFO [TomcatDeployer] deploy, ctxPath=/WebClient, warUrl=.../tmp/deploy/tmp4906WebClient-exp.war/
13:26:26,945 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
13:26:27,242 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@b1f2003b { url=file:/C:/JBoss/jboss-4.0.3SP1/server/default/deploy/EJBEntity.jar }
deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
state: FAILED
watch: file:/C:/JBoss/jboss-4.0.3SP1/server/default/deploy/EJBEntity.jar
altDD: null
lastDeployed: 1164972385617
lastModified: 1164972385586
mbeans:
13:26:27,570 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
13:26:27,961 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
13:26:27,992 INFO [JkMain] Jk running ID=0 time=0/94 config=null
13:26:28,070 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in 33s:31ms
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990414#3990414
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990414
18 years, 3 months
[JBossCache] - configuration question: how to limit size of NAKACK structur
by bruyeron
I am running into an issue in the case when something is wrong with several nodes in the cluster, and the surviving node somehow does not evict the troublesome nodes and starts accumulating messages.
The current config looks like this:
| <property name="isolationLevel" value="REPEATABLE_READ" />
| <property name="cacheMode" value="REPL_ASYNC" />
| <property name="clusterName" value="${treeCache.clusterName}" />
| <property name="useReplQueue" value="false" />
| <property name="replQueueInterval" value="0" />
| <property name="replQueueMaxElements" value="0" />
| <property name="fetchInMemoryState" value="true" />
| <property name="initialStateRetrievalTimeout" value="20000" />
| <property name="syncReplTimeout" value="20000" />
| <property name="lockAcquisitionTimeout" value="5000" />
| <property name="useRegionBasedMarshalling" value="false" />
| <property name="clusterProperties"
| value="${treeCache.clusterProperties}" />
| <property name="serviceName">
| <bean class="javax.management.ObjectName">
| <constructor-arg value="jboss.cache:service=${treeCache.clusterName},name=${treeCache.instanceName}"/>
| </bean>
| </property>
| <property name="evictionPolicyClass" value="org.jboss.cache.eviction.LRUPolicy"/>
| <property name="maxAgeSeconds" value="${treeCache.eviction.maxAgeSeconds}"/>
| <property name="maxNodes" value="${treeCache.eviction.maxNodes}"/>
| <property name="timeToLiveSeconds" value="${treeCache.eviction.timeToLiveSeconds}"/>
|
The jgroups stack is this:
| treeCache.clusterProperties=UDP(ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=${treeCache.mcastAddress};mcast_port=${treeCache.mcastPort};mcast_recv_buf_
| size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000;bind_addr=${treeCache.bind_addr}):\
| PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):\
| MERGE2(max_interval=20000;min_interval=10000):\
| FD_SOCK(down_thread=false;up_thread=false):\
| VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):\
| pbcast.NAKACK(down_thread=false;gc_lag=50;retransmit_timeout=600,1200,2400,4800;up_thread=false):\
| pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):\
| UNICAST(down_thread=false;;timeout=600,1200,2400):\
| FRAG(down_thread=false;frag_size=8192;up_thread=false):\
| pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):\
| pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
|
The cluster has 12 nodes, and I had this situation occur when 3 of the nodes failed, which provoked the ops team into restarting 9 of them. The remaning 3 all went OOM quickly. Analysing the heap dump post-mortem, I see this:
org.jgroups.protocols.pbcast.NAKACK retained size=245MB
My first step is to add FD into the stack to adress the issue of failure detection not working properly in some cases. Then I would like to limit the size of the NAKACK structure (even if this means losing consistency accross the cluster): is this possible at all? What are your suggestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990413#3990413
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990413
18 years, 3 months