Quantcast

Random error when installing an app

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Random error when installing an app

Claudius Teodorescu
Hi,

I do have an app with size of 5982k, which is sometimes installed fine, but other times occurs "GC overhead limit exceeded" error and server halts.

Thanks,
Claudius

Coordinates:
General
OS: Ubuntu 12.04 (Linux 3.2.0-39-generic amd64);
eXist version: 2.0RC2
eXist Build: 20130204
SVN Revision: 0000

Java
Vendor: Sun Microsystems Inc.
Version: 1.6.0_32
Implementation: Java HotSpot(TM) 64-Bit Server VM
Installation: /usr/lib/jvm/jdk1.6.0_32/jre
Temp file path: ../../../tools/jetty/tmp

Memory Usage
Max. Memory: 466048K
Current Total: 252480K
Free: 229535K

error stacktrace:
INFO   | jvm 1    | 2013/04/30 20:29:44 | INFO: Warning: package uses old-style content dir: '/home/claudius/workspaces/eXist/eXist-2.1/webapp/WEB-INF/data/expathrepo/richmond-0.1/richmond'
INFO   | jvm 1    | 2013/04/30 20:39:17 | 30 Apr 2013 20:39:17,276 [eXistThread-34] WARN  (ServletHandler.java [doHandle]:522) - /apps/dashboard/plugins/packageManager/packages/
INFO   | jvm 1    | 2013/04/30 20:39:17 | java.lang.OutOfMemoryError: GC overhead limit exceeded
STATUS | wrapper  | 2013/04/30 20:39:17 | The JVM has run out of memory.  Shutting down.
INFO   | jvm 1    | 2013/04/30 20:39:17 | at sun.reflect.GeneratedConstructorAccessor3.newInstance(Unknown Source)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at java.lang.Class.newInstance0(Class.java:355)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at java.lang.Class.newInstance(Class.java:308)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at antlr.ASTFactory.create(ASTFactory.java:262)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at antlr.ASTFactory.create(ASTFactory.java:153)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at antlr.ASTFactory.create(ASTFactory.java:194)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.ifExpr(XQueryParser.java:4105)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.exprSingle(XQueryParser.java:3776)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.expr(XQueryParser.java:428)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.functionBody(XQueryParser.java:2671)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.functionDecl(XQueryParser.java:2315)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.annotateDecl(XQueryParser.java:1557)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.prolog(XQueryParser.java:976)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.libraryModule(XQueryParser.java:641)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.module(XQueryParser.java:562)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryParser.xpath(XQueryParser.java:472)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQueryContext.compileModule(XQueryContext.java:2887)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQueryContext.compileOrBorrowModule(XQueryContext.java:2825)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2737)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:5743)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:4816)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4099)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:4044)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3712)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQuery.compile(XQuery.java:157)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQuery.compile(XQuery.java:106)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.xquery.XQuery.compile(XQuery.java:90)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.http.urlrewrite.XQueryURLRewrite.runQuery(XQueryURLRewrite.java:690)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:242)
INFO   | jvm 1    | 2013/04/30 20:39:17 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Jason Smith-11
I use Tomcat for running eXist, so I am not quite sure where to do this in Jetty, but start by increasing your Java heap size. Maybe the -Xmx setting? You can usually allocate about half the physical RAM in the machine (max) to the JVM heap before you start to run into problems. This depends on what else you are running, obviously. :-)

Also, your build is from Feb 4. The 2.0 release was Feb 7, and if you are keen on building it yourself, the branch has a number of fixes already. Probably nothing to do with the OOM error. But you should probably at least get the release version.

I see you are using Java 6. Java 7 is faster all around, and there are some memory management optimizations that might help. Since you are on Ubuntu 12.04, you can just install the OpenJDK7 stuff (Google around for instructions for switching from 6 to 7).

Good luck!

Jason Smith
Software Engineer

This e-mail and all information included herein do not constitute a legal agreement accorded by INFOTRUST GROUP and its affiliates and subsidiaries.  All legal agreements must be formulated in writing by a legal representative of INFOTRUST GROUP. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
________________________________________
From: Claudius Teodorescu [[hidden email]]
Sent: Tuesday, April 30, 2013 11:48 AM
To: [hidden email]
Subject: [Exist-open] Random error when installing an app

Hi,

I do have an app with size of 5982k, which is sometimes installed fine, but
other times occurs "GC overhead limit exceeded" error and server halts.

Thanks,
Claudius

*Coordinates*:
General
OS: Ubuntu 12.04 (Linux 3.2.0-39-generic amd64);
eXist version: 2.0RC2
eXist Build:    20130204
SVN Revision:   0000

Java
Vendor: Sun Microsystems Inc.
Version:        1.6.0_32
Implementation: Java HotSpot(TM) 64-Bit Server VM
Installation:   /usr/lib/jvm/jdk1.6.0_32/jre
Temp file path: ../../../tools/jetty/tmp

Memory Usage
Max. Memory:    466048K
Current Total:  252480K
Free:   229535K

...
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Claudius Teodorescu
Thanks for answer.

I updated eXist (eXist Version: 2.1dev, eXist Build: 20130501).

I would like to wait a little before adopting OpenJDK 7, as there is not enough good feedback on eXist ML as to it.

Initially, I was concerned about the size of app, but I saw bigger apps on eXist public expath repo.

My guess is that is all about indexing, as the pre-install.xql script adds to '/db/system/...' six collection.xconf files for various indexes. And the indexing operations I think are started in a very rapid succession, as the respective files are very fast written by the mentioned script.

WDYT?

Claudius
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Wolfgang Meier-2
Hi Claudius,

I would like to wait a little before adopting OpenJDK 7, as there is not
enough good feedback on eXist ML as to it.

Nowadays JDK 7 is the default on all my installations and apart from some uncritical file lock issues in the test suite, it is running very well.

Initially, I was concerned about the size of app, but I saw bigger apps on
eXist public expath repo.

I think the main problem is the tiny heap size (reported with 466048K) you have given to Java. Depending on the size of your caches (cacheSize in conf.xml), eXist may already use up a considerable part of this for indexing.

Wolfgang

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Claudius Teodorescu
Thanks for answering.

I changed cacheSize to "256M" in conf.xml.

After this, I installed the app one; the second time I got 'Java heap space' error.

Claudius
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Wolfgang Meier-2
> I changed cacheSize to "256M" in conf.xml.

Ok, so you increased the cacheSize, but not the amount of memory available to Java. If Java has 500mb memory, you already use half of it just for caching, which does not leave much room for libraries and the application.

You need to increase the -Xmx setting passed to Java. Where you do this depends on how you launch eXist. If you use the desktop launcher (start.jar without arguments), settings are read from vm.properties.

Wolfgang
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Random error when installing an app

Claudius Teodorescu
Modified, and worked.

Thanks, Wolfgang, I owe you a beer next Prague. ;)

Claudius
Loading...