[JBoss Cache] - JBoss Cache - Memory Leak when many Fqn/nodes added in Cache
by Sathish
Sathish [http://community.jboss.org/people/sathish_06] created the discussion
"JBoss Cache - Memory Leak when many Fqn/nodes added in Cache"
To view the discussion, visit: http://community.jboss.org/message/617503#617503
--------------------------------------------------------------
All - Iam observing OOM in JBoss Cache, with below mentioned scenario. Would like to get suggestions/help on the approach that iam doing to over come the situation is correct or not. Here is the details on the problem,
Problem:- JBoss Cache - Memory Leak when many Fqn/nodes added in Cache using TreeCache.put() API
Explanation of the problem:- When adding new data in cache with new node in the tree, its causing memory leak.
Environment/Config settings:-
JBoss Cache Version:-JBossCache 1.2.4.SP2[ $Id: Version.java,v 1.5.2.1.4.3 2006/02/15 05:08:06 bstansberry Exp $]\
CacheMode:LOCAL
EvictionPolicy: LRUPolicy
Test Cache region - /testRegionX definition:-
<region name="/testRegionX">
<attribute name="maxNodes">1000</attribute>
<attribute name="timeToLiveSeconds">30</attribute>
<!-- Maximum time an object is kept in cache regardless of idle time -->
<attribute name="maxAgeSeconds">30</attribute>
</region>
In the test code, start adding new objects in the cache(treeCache.put(identifier, key , vo)) with different FQN/tree node, as shown below.
/testRegionX/a/b/ k1, v1
/testRegionX/a1/b1/ k2, v2
/testRegionX/a12b2/ k2, v3
.....
Snippet of the test code,
TreeCache treeCache;
try {
treeCache = new TreeCache();
treeCache.setCacheMode(TreeCache.LOCAL);
System.out.println("JBoss Cache Version:-" + treeCache.getVersion());
PropertyConfigurator config = new PropertyConfigurator();
config.configure(treeCache, "TreeCache.xml");
treeCache.startService();
String identifier_prefix = "/testRegionX";
String key_prefix = "key_01_";
for(long i=0;;i++)
{
String key = key_prefix + i;
String identifier = identifier_prefix + "/" + i + "/data/";
//String identifier = identifier_prefix;
System.out.println("Identifer = " + identifier);
DummyVO vo = new DummyVO();
System.out.println("Adding[Id=new node, Key=unique] - Key - " + key);
treeCache.put(identifier, key , vo);
//access the data from cache
treeCache.get(identifier, key);
//dont call remove
//treeCache.remove(identifier, key);
//System.out.println("cache.remove called");
}
//treeCache.stopService();
} catch (Exception e) {
e.printStackTrace();
}
Refer attached zip file contains complete Tree cache configuration(TreeCache.xml) and test code. Just point the jboss library location in the ant.properits file to run the test code.
Note that i dont call the tree.remove() to remove the cache data, instead let the Cache manager evict the object once it gets expired(configured expiry time to 30 seconds.).
Ran test with default JVM heap size, and reunning out of memory in the 50K iteration. Took JMap histo and noticed that below 2 objects are not releasing, Attached histo in text file.
C:\Documents and Settings\skandasa>jmap -histo:live 4508
num #instances #bytes class name
----------------------------------------------
1: 107609 16019856 [LEDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$Entry;
3: 107609 6026104 EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap
When I start adding new objects in the cache(treeCache.put(identifier, key , vo)) in the same tree node ('/testRegionX' ie., not creating new nodes in the tree, as shown below) then not observing this OOM problem.
/testRegionX/ k1, v1
/testRegionX/ k2, v2
/testRegionX/ k2, v3
.....
In other words, if i simply store data in cache as a Hashmap, without creating many tree nodes, then not observing OOM.
Any thoughts on this behaviour of the JBoss cache ? How can i get control over the OOM problem when adding new nodes in the tree cache ?
Please advice!
Thanks,
Sathish
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617503#617503]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[jBPM] - Re: JBPM 3.2.5, MSSQL 2005 - blocking in JBPM_JOB table
by Alejandro Guizar
Alejandro Guizar [http://community.jboss.org/people/alex.guizar%40jboss.com] created the discussion
"Re: JBPM 3.2.5,MSSQL 2005 - blocking in JBPM_JOB table"
To view the discussion, visit: http://community.jboss.org/message/563437#563437
--------------------------------------------------------------
> Looking at how the jbpm_job table is utilized, yes, I think these specific indexes can be removed. Just to clarify. From what I have seen in *our use-case*, under normal circumstances the jbpm_job table has very few entries at any point in time. Seems like entries are added and removed constantly. That being the case, I'm not sure I can see a benefit of spending the extra time/resources maintaining indexes which are never utilized.
I'm going to explore the possibility of removing the job indexes. Can you please https://jira.jboss.org/browse/JBPM create a JIRA issue for this?
> By the way, this is as good a time to explain the use-case that is failing for us. We have a workflow with three steps synchronous steps. The first step takes a couple to a few hundred milliseconds to complete, the second step can take anywhere from 5 to 30 seconds to complete and then the last step usually takes a half a second. When I mentioned jobs earlier, I was referring to workflows contained the three steps just mentioned.
If possible, could you attach your workflow and test harness to the JIRA issue? Please remove any sensitive information you would not like to see published.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563437#563437]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[JBoss Remoting] - LeasePinger, BisocketServerInvoker, Jboss remoting, Messaging
by Srivisakh Rajasekar
Srivisakh Rajasekar [http://community.jboss.org/people/srivisakh_r] created the discussion
"LeasePinger, BisocketServerInvoker, Jboss remoting, Messaging"
To view the discussion, visit: http://community.jboss.org/message/621140#621140
--------------------------------------------------------------
Hi,
I am facing the same issue as mentioned in the thread. http://community.jboss.org/message/584787#584787 http://community.jboss.org/message/584787
I am using Jboss 5.1.0 with Jboss Messaging.I am receiving the JMS messages from the server for processing in the client(ATG running on Jboss 5.1.0).
If the client is up and running and the server stops in between , i am getting a message as
+13:47:52,328 WARN [LeasePinger] org.jboss.remoting.LeasePinger$LeaseTimerTask@f038e9 failed to ping to server: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:+
+ java.io.IOException: Connection reset by peer: socket write error+
But if the server restarts again, still the client(which is UP stiill) dosent reconnects, but throws the following Warning.
+13:47:57,359 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=35055,localport=4235],5,] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:48:47,360 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4264],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:49:17,360 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4279],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:49:47,360 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4305],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:50:17,360 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4325],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:50:47,360 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4337],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:51:17,361 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4350],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:51:47,361 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4415],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:52:02,361 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4419],5,] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:52:32,361 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4422],5,jboss] (a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0: requesting new control connection+
+13:53:02,377 WARN [BisocketServerInvoker] org.jboss.remoting.transport.bisocket.BisocketServerInvoker$ControlMonitorTimerTask@137940f: detected failure on control connection Thread[control: Socket[ad+
+dr=sjoshiw5.ad.nike.com/10.192.227.59,port=20352,localport=4427],5,jboss]+
+13:53:02,393 WARN [BisocketServerInvoker] Control connection a5f4l2r-alztsh-grdwtj0n-1-grdww9ue-a0 has been recreated 10 times.+
+13:53:02,393 WARN [BisocketServerInvoker] Assuming it is a connection to an old server, and will not restart+
I downloaded the jboss-remoting.jar 2.2.4( http://www.jboss.org/jbossremoting/downloads.html http://www.jboss.org/jbossremoting/downloads.html) , but still it dosent help me. I saw a JIRA ticket opened on the same( https://issues.jboss.org/browse/JBREM-1144 https://issues.jboss.org/browse/JBREM-1144) and downloaded the jar from there too. Still i m facing this issue.
Kindly let me know on what i m missing with respect to the version or should i have to do any additional configuration to make it working.
Thanks
Sri.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621140#621140]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months