[opencms-dev] java out of memory error
Schliemann, Kai
K.Schliemann at comundus.com
Mon Aug 25 13:48:00 CEST 2014
Hi Chris,
we had the same problem with just 256M. We are good now with 512M, whereas it is still a little bit slow, when doing a lot of page editing / publishing.
As always, it depends on how much users are going to use OpenCms. So it is definitely a little bit trial and error on the correct setting for Xmx.
In my humble opinion, there are very little circumstances, where a setting of Xmx > 8G are necessary.
That is my developer experience with more than 30 OpenCms projects.
I am very interested in experiences of other OpenCms developers.
HTH
Kai
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Christoph Kukulies
Gesendet: Montag, 25. August 2014 12:49
An: The OpenCms mailing list
Betreff: [opencms-dev] java out of memory error
When trying to publish a file (21448934 bytes) in OpenCms 9.0.1
I'm getting:
Error publishing file "/sites/mysite.org/SomeDir/somefilename.pdf".
Exception java.lang.OutOfMemoryError: Java heap space
at org.opencms.file.CmsFile.clone(CmsFile.java:158)
at org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)
at org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)
at org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)
at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)
at org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)
at org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)
Statistics: published files: 1, published folders: 0, deleted folders: 0, duration: 00:00:02
Exception org.opencms.file.CmsVfsException: Error publishing file "/sites/mysite.org/SomeDir/somefilename.pdf".
at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:338)
at org.opencms.db.CmsDbContext.report(CmsDbContext.java:286)
at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1781)
at org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)
at org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.opencms.file.CmsFile.clone(CmsFile.java:158)
at org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)
at org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)
at org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)
at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)
... 2 more
... the resources have been published
Asa countermeasure I already increased the -Xmx paramter in /etc/init.d/tomcat7:
# Default Java options
# Set java.awt.headless=true if JAVA_OPTS is not set so the
# Xalan XSL transformer can work without X11 display on JDK 1.4+
# It also looks like the default heap size of 64M is not enough for most cases
# so the maximum heap size is set to 128M
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true -Xmx256M"
fi
But still I'm getting the above error.
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140825/370a8c55/attachment.htm>
More information about the opencms-dev
mailing list