[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-709) Out of memory problem

Ben Wang (JIRA) jira-events at jboss.com
Wed Jul 26 04:54:11 EDT 2006


    [ http://jira.jboss.com/jira/browse/JBCACHE-709?page=comments#action_12340069 ] 
            
Ben Wang commented on JBCACHE-709:
----------------------------------

Are you sure it is memory leak instead of just GC not kick in yet? If you are certain, can you attach a junit test case to illustrate this?

> Out of memory problem
> ---------------------
>
>                 Key: JBCACHE-709
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-709
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.2.4SP2
>         Environment: Windows NT, Ecliplse IDE and Pentium 4 processor.
>            Reporter: Sudhakar Pandey
>         Assigned To: Manik Surtani
>            Priority: Critical
>         Attachments: TreeCache.xml
>
>
> Problem:
> ~~~~~~~
> While running the following testcase after entering 66666 records my system program is getting hang.
> Following is the description of program:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I am putting some String object in TreeCache, accessing it and then removing it from the cache. I am doing this in a infinite loop. 
> Following is the eviction policy:
> ~~~~~~~~~~~~~~~~~~~~~~~
>         <attribute name="EvictionPolicyConfig">
>            <config>
>               <attribute name="wakeUpIntervalSeconds">72000</attribute>
>               <!-- Cache wide default -->
>               <region name="/_default_">
>               	<attribute name="maxNodes">500</attribute>
> 	          	<attribute name="timeToLiveSeconds">180</attribute>
> 			  	<!-- Maximum time an object is kept in cache regardless of idle time -->
> 			  	<attribute name="maxAgeSeconds">7200</attribute>
>               </region>
>               <!-- yodlee wide default -->
>               <region name="/com/yodlee">
>                 <attribute name="maxNodes">500</attribute>
> 	          	<attribute name="timeToLiveSeconds">180</attribute>
> 			  	<!-- Maximum time an object is kept in cache regardless of idle time -->
> 			  	<attribute name="maxAgeSeconds">7200</attribute>
>               </region>                          
>            </config>
>         </attribute>
> *IMPORTENT*: If I reduce the 'wakeUpIntervalSeconds' then there is no leak. However, I can reduce this time coz it eats up lots of CPU. 
> I have attached the Tree Cache Configuration xml file also.
> Program:
> ~~~~~~~
> public void testTreeCache(){
> 		TreeCache treeCache;
> 		try {
> 			treeCache = new TreeCache();
> 			treeCache.setCacheMode(TreeCache.LOCAL);
> 			
> 			// configure TreeCache
> 			PropertyConfigurator config = new PropertyConfigurator();  
> 			config.configure(treeCache, "com/yodlee/core/system/services/cacheservice/TreeCache.xml");
> 			
> 			treeCache.startService();			
> 			String identifier = "Test/MemoryLeak/";
> 			String key = "key";
> 			String value = "JBoss Cache is a product designed to cache frequently accessed Java objects in order to dramatically improve the performance of e-business applications. By eliminating unnecessary database access, JBoss Cache decreases network traffic and increases the scalability of applications.";
> 			for(int i=0;;i++)
> 			{
> 				System.out.println("Putting key=" + (key +i));
> 				treeCache.put(identifier, key +i, value);
> 				System.out.println(treeCache.get(identifier, key + i));
> 				System.out.println("Removing key=" + (key+i));
> 				treeCache.remove(identifier, key + i);			
> 				
> 			}
> 			//treeCache.stopService();
> 		} catch (Exception e) {
> 			MessageController.log(JBossCacheServiceImpl.class.getName(), 1,
> 					ExceptionHelper.getExceptionStackTrace(e),
> 					MessageController.FATAL);
> 			throw new CoreException(ExceptionHelper.getExceptionStackTrace(e));
> 		}
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list