<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.err
{mso-style-name:err;}
span.throw
{mso-style-name:throw;}
span.head
{mso-style-name:head;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Chris,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In my humble opinion, there are very little circumstances, where a setting of Xmx > 8G are necessary.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That is my developer experience with more than 30 OpenCms projects.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I am very interested in experiences of other OpenCms developers.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Kai<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<b>Im Auftrag von </b>Christoph Kukulies<br>
<b>Gesendet:</b> Montag, 25. August 2014 12:49<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> [opencms-dev] java out of memory error<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When trying to publish a file (21448934 bytes) in OpenCms 9.0.1
<br>
I'm getting:<br>
<br>
<span class="err">Error publishing file "/sites/mysite.org/SomeDir/somefilename.pdf".
</span><br>
<span class="throw">Exception java.lang.OutOfMemoryError: Java heap space</span><br>
<span class="throw">at org.opencms.file.CmsFile.clone(CmsFile.java:158)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)</span><br>
<span class="throw">at org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)</span><br>
<span class="throw">at org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)</span><br>
Statistics: published files: 1, published folders: 0, deleted folders: 0, duration: 00:00:02<br>
<span class="throw">Exception org.opencms.file.CmsVfsException: Error publishing file "</span><span class="err">/sites/mysite.org/SomeDir/somefilename.pdf</span><span class="throw">".
</span><br>
<span class="throw">at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:338)</span><br>
<span class="throw">at org.opencms.db.CmsDbContext.report(CmsDbContext.java:286)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1781)</span><br>
<span class="throw">at org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)</span><br>
<span class="throw">at org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)</span><br>
<span class="throw">Caused by: java.lang.OutOfMemoryError: Java heap space</span><br>
<span class="throw">at org.opencms.file.CmsFile.clone(CmsFile.java:158)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)</span><br>
<span class="throw">at org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)</span><br>
<span class="throw">... 2 more</span><br>
<span class="head">... the resources have been published</span><br>
<br>
<br>
<br>
Asa countermeasure I already increased the -Xmx paramter in /etc/init.d/tomcat7:<br>
<br>
# Default Java options<br>
# Set java.awt.headless=true if JAVA_OPTS is not set so the<br>
# Xalan XSL transformer can work without X11 display on JDK 1.4+<br>
# It also looks like the default heap size of 64M is not enough for most cases<br>
# so the maximum heap size is set to 128M<br>
if [ -z "$JAVA_OPTS" ]; then<br>
JAVA_OPTS="-Djava.awt.headless=true -Xmx<span style="color:red">256M</span>"<br>
fi<br>
<br>
But still I'm getting the above error.<br>
<br>
-- <br>
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>