Opened 9 years ago

Closed 9 years ago

#1715 closed defect (fixed)

Tomcat 8 unresponcive when started - out of memory

Reported by: kalxas Owned by: live-demo@…
Priority: critical Milestone: OSGeoLive10.0
Component: OSGeoLive Keywords: tomcat 8
Cc: live-demo@…

Description

Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOfRange(Arrays.java:3664)
	at java.lang.String.<init>(String.java:207)
	at java.io.DataInputStream.readUTF(DataInputStream.java:661)
	at java.io.DataInputStream.readUTF(DataInputStream.java:564)
	at org.apache.tomcat.util.bcel.classfile.ConstantUtf8.getInstance(ConstantUtf8.java:38)
	at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:81)
	at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:55)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:176)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:85)
	at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2204)
	at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2189)
	at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2094)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2046)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1991)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1961)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1915)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1158)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:780)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1091)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1830)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

Jun 03, 2016 8:12:20 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
Caused by: java.lang.OutOfMemoryError: Java heap space

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

Change History (5)

comment:1 by kalxas, 9 years ago

We need to allocate more memory than 128 MB in /etc/default/tomcat8

comment:2 by kalxas, 9 years ago

After allocating 2GB, all tomcat applications work. I will commit a fix for this soon.

comment:3 by kalxas, 9 years ago

Priority: blockercritical

Fix committed:

https://git.osgeo.org/gogs/kalxas/OSGeoLive/commit/d3d8a94aa49df07642b6c783beac4e4d01f1148d

Lets see if it works fine with 1GB of RAM, as much as our minimum requirements say ;)

comment:4 by kalxas, 9 years ago

Fix confirmed in nightly build 94.

comment:5 by kalxas, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.