<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "outofmemoryerror using ehcache 4.1.2 snapshot"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/16.page</link>
		<description><![CDATA[Latest messages posted in the topic "outofmemoryerror using ehcache 4.1.2 snapshot"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>outofmemoryerror using ehcache 4.1.2 snapshot</title>
				<description><![CDATA[ Hello all,

I am having a problem using the hibernate-ehcache 4.1.2 snapshot. Tha caches seem to be working well at first, but then after approximately 2 days, i start top get outofmemoryerrors, which seem to be originating when i attempt to retrieve objects from a cache.

The stack trace is as follows:
<span class="genmed"><b>Code:</b></span><br>
		<div>
		<pre bbCodeId="pre-code" style="overflow: auto; width: 95%; max-height: 350px; height:expression(this.scrollHeight > 350 ? '350px' : 'auto');">
&#91;2012-03-22 16:16:06,823&#93; WARN605927&#91;http-bio-80-exec-897&#93; - net.sf.ehcache.constructs.web.filter.Filter.logThrowable&#40;Filter.java:138&#41; - Throwable thrown during doFilter on request with URI: /ihq/admin/site_tree and Query: _dc=1332432966759&node=Request processing failed; nested exception is net.sf.ehcache.CacheException: net.sf.ehcache.CacheException: Uncaught exception in get&#40;&#41; - PermGen space
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is net.sf.ehcache.CacheException: net.sf.ehcache.CacheException: Uncaught exception in get&#40;&#41; - PermGen space
	at org.springframework.web.servlet.FrameworkServlet.processRequest&#40;FrameworkServlet.java:894&#41;
	at org.springframework.web.servlet.FrameworkServlet.doGet&#40;FrameworkServlet.java:778&#41;
	at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java:621&#41;
	at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java:722&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:304&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	atcom.example.webmanager.filter.PagePreviewFilter.doFilter&#40;PagePreviewFilter.java:62&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter&#40;GzipFilter.java:95&#41;
	at net.sf.ehcache.constructs.web.filter.Filter.doFilter&#40;Filter.java:86&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal&#40;CharacterEncodingFilter.java:88&#41;
	at org.springframework.web.filter.OncePerRequestFilter.doFilter&#40;OncePerRequestFilter.java:76&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal&#40;HiddenHttpMethodFilter.java:77&#41;
	at org.springframework.web.filter.OncePerRequestFilter.doFilter&#40;OncePerRequestFilter.java:76&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at com.example.commons.filters.HttpHeadFilter.doFilter&#40;HttpHeadFilter.java:47&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:369&#41;
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke&#40;FilterSecurityInterceptor.java:109&#41;
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter&#40;FilterSecurityInterceptor.java:83&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter&#40;ExceptionTranslationFilter.java:97&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter&#40;RequestCacheAwareFilter.java:35&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter&#40;AbstractAuthenticationProcessingFilter.java:187&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter&#40;LogoutFilter.java:105&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter&#40;ConcurrentSessionFilter.java:109&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter&#40;SecurityContextPersistenceFilter.java:79&#41;
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter&#40;FilterChainProxy.java:381&#41;
	at org.springframework.security.web.FilterChainProxy.doFilter&#40;FilterChainProxy.java:168&#41;
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate&#40;DelegatingFilterProxy.java:346&#41;
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter&#40;DelegatingFilterProxy.java:259&#41;
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java:243&#41;
	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java:210&#41;
	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java:224&#41;
	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java:169&#41;
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke&#40;AuthenticatorBase.java:472&#41;
	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java:168&#41;
	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java:100&#41;
	at org.apache.catalina.valves.AccessLogValve.invoke&#40;AccessLogValve.java:929&#41;
	at org.apache.catalina.valves.RemoteIpValve.invoke&#40;RemoteIpValve.java:681&#41;
	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java:118&#41;
	at org.apache.catalina.connector.CoyoteAdapter.service&#40;CoyoteAdapter.java:405&#41;
	at org.apache.coyote.http11.AbstractHttp11Processor.process&#40;AbstractHttp11Processor.java:964&#41;
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process&#40;AbstractProtocol.java:515&#41;
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run&#40;JIoEndpoint.java:302&#41;
	at java.util.concurrent.ThreadPoolExecutor.runWorker&#40;ThreadPoolExecutor.java:1110&#41;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run&#40;ThreadPoolExecutor.java:603&#41;
	at java.lang.Thread.run&#40;Thread.java:636&#41;
Caused by: net.sf.ehcache.CacheException: net.sf.ehcache.CacheException: Uncaught exception in get&#40;&#41; - PermGen space
	at net.sf.ehcache.constructs.nonstop.NonstopExecutorServiceImpl.execute&#40;NonstopExecutorServiceImpl.java:101&#41;
	at net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore.executeWithExecutor&#40;ExecutorServiceStore.java:160&#41;
	at net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore.executeWithExecutor&#40;ExecutorServiceStore.java:129&#41;
	at net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore.get&#40;ExecutorServiceStore.java:411&#41;
	at net.sf.ehcache.constructs.nonstop.store.NonstopStoreImpl.get&#40;NonstopStoreImpl.java:344&#41;
	at net.sf.ehcache.Cache.searchInStoreWithStats&#40;Cache.java:1986&#41;
	at net.sf.ehcache.Cache.get&#40;Cache.java:1618&#41;
	at net.sf.ehcache.Cache.get&#40;Cache.java:1591&#41;
	at com.example.webmanager.logic.tree.TreeCacheManager.getFromCache&#40;TreeCacheManager.java:102&#41;
	at com.example.webmanager.logic.tree.TreeService.buildBranch&#40;TreeService.java:28&#41;
	at com.example.webmanager.controller.admin.TreeController.getTreeJson&#40;TreeController.java:42&#41;
	at sun.reflect.GeneratedMethodAccessor219.invoke&#40;Unknown Source&#41;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java:43&#41;
	at java.lang.reflect.Method.invoke&#40;Method.java:616&#41;
	at org.springframework.web.method.support.InvocableHandlerMethod.invoke&#40;InvocableHandlerMethod.java:212&#41;
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest&#40;InvocableHandlerMethod.java:126&#41;
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle&#40;ServletInvocableHandlerMethod.java:96&#41;
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod&#40;RequestMappingHandlerAdapter.java:617&#41;
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal&#40;RequestMappingHandlerAdapter.java:578&#41;
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle&#40;AbstractHandlerMethodAdapter.java:80&#41;
	at org.springframework.web.servlet.DispatcherServlet.doDispatch&#40;DispatcherServlet.java:900&#41;
	at org.springframework.web.servlet.DispatcherServlet.doService&#40;DispatcherServlet.java:827&#41;
	at org.springframework.web.servlet.FrameworkServlet.processRequest&#40;FrameworkServlet.java:882&#41;
	... 59 more
Caused by: net.sf.ehcache.CacheException: Uncaught exception in get&#40;&#41; - PermGen space
	at org.terracotta.modules.ehcache.store.ClusteredSafeStore.get&#40;ClusteredSafeStore.java:685&#41;
	at net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore$12.call&#40;ExecutorServiceStore.java:413&#41;
	at net.sf.ehcache.constructs.nonstop.store.ExecutorServiceStore$12.call&#40;ExecutorServiceStore.java:411&#41;
	at java.util.concurrent.FutureTask$Sync.innerRun&#40;FutureTask.java:334&#41;
	at java.util.concurrent.FutureTask.run&#40;FutureTask.java:166&#41;
	at net.sf.ehcache.constructs.nonstop.NonstopThreadPool$WorkerThreadLocal$1.run&#40;NonstopThreadPool.java:180&#41;
	at net.sf.ehcache.constructs.nonstop.NonstopThreadPool$Worker.run&#40;NonstopThreadPool.java:222&#41;
	... 1 more
</pre>
		</div>


apparntly from this, it is being caused by the a cache retrieval from something we call the "privateTreeCache". Its config is as follows:

<span class="genmed"><b>Code:</b></span><br>
		<div>
		<pre bbCodeId="pre-code" style="overflow: auto; width: 95%; max-height: 350px; height:expression(this.scrollHeight > 350 ? '350px' : 'auto');">&lt;cache name="privateTreeCache" maxElementsInMemory="5000" maxElementsOnDisk="100000" eternal="false"
		timeToLiveSeconds="3600" overflowToDisk="false" statistics="true"&gt;
		&lt;terracotta&gt;
			&lt;nonstop&gt;
				&lt;timeoutBehavior type="noop" /&gt;
			&lt;/nonstop&gt;
		&lt;/terracotta&gt;
	&lt;/cache&gt;</pre>
		</div>]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6820.page#34266</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6820.page#34266</link>
				<pubDate><![CDATA[Thu, 22 Mar 2012 10:02:41]]> GMT</pubDate>
				<author><![CDATA[ rbkaer]]></author>
			</item>
			<item>
				<title>Re:outofmemoryerror using ehcache 4.1.2 snapshot</title>
				<description><![CDATA[ How much memory you are starting your process with ? Can you please let us know what are your Xmx Xms settings ? 

Depending on your memory usage and size of an individual object in cache, you might have to tune the number of objects you are keeping in memory i.e : maxElementsInMemory]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6820.page#34346</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6820.page#34346</link>
				<pubDate><![CDATA[Wed, 28 Mar 2012 02:25:17]]> GMT</pubDate>
				<author><![CDATA[ rmahajan]]></author>
			</item>
			<item>
				<title>Re:outofmemoryerror using ehcache 4.1.2 snapshot</title>
				<description><![CDATA[ When this error happened, we were just using the tomcat default values, while the Terracotta servers had -Xmx512m and -Xms512m.
We recently increased the MaxPermSize to 256 to see if that makes any difference and we are still awaiting the results of that experiment. We are the using hibernate ehcache 4.1.2 snapshot.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/6820.page#34371</guid>
				<link>http://forums.terracotta.org/forums/posts/list/6820.page#34371</link>
				<pubDate><![CDATA[Thu, 29 Mar 2012 05:38:52]]> GMT</pubDate>
				<author><![CDATA[ rbkaer]]></author>
			</item>
	</channel>
</rss>