<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    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<br>
      at org.opencms.file.CmsFile.clone(CmsFile.java:158)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)<br>
      at
      org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)<br>
      at
      org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)<br>
    </span>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="throw"><span
        class="err">/sites/mysite.org/SomeDir/somefilename.pdf</span>".
      <br>
      at
      org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:338)<br>
      at org.opencms.db.CmsDbContext.report(CmsDbContext.java:286)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1781)<br>
      at
      org.opencms.db.CmsDriverManager.publishJob(CmsDriverManager.java:5991)<br>
      at
      org.opencms.publish.CmsPublishThread.run(CmsPublishThread.java:154)<br>
      Caused by: java.lang.OutOfMemoryError: Java heap space<br>
      at org.opencms.file.CmsFile.clone(CmsFile.java:158)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishFileContent(CmsProjectDriver.java:1319)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishNewFile(CmsProjectDriver.java:3693)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.java:1231)<br>
      at
org.opencms.db.generic.CmsProjectDriver.publishProject(CmsProjectDriver.java:1749)<br>
      ... 2 more<br>
    </span><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<font
      color="#ff0000">256M</font>"<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
    <div class="moz-signature"><br>
    </div>
  </body>
</html>