Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-11746

Fix OutOfMemoryError while adding a big picture via WebDAV

    XMLWordPrintable

    Details

      Description

      Copying a large picture (more than 1GB for instance) through WebDAV cannot be complete and fails with this error

      Error from logs

      ERROR [nuxeo-error-log] javax.servlet.ServletException: javax.servlet.ServletException: On requestURL: http://nereid:8080/nuxeo/site/dav/Administrator/fat_file_1Go.tif
      ...
      Caused by: java.lang.OutOfMemoryError: Java heap space
      	at net.sf.jmimemagic.MagicMatcher.test(MagicMatcher.java:209)
      	at net.sf.jmimemagic.Magic.getMagicMatch(Magic.java:344)
      	at org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService.getMimetypeFromFile(MimetypeRegistryService.java:193)
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.getImageMimeType(ImagingComponent.java:103)
      	at org.nuxeo.ecm.platform.picture.api.adapters.DefaultPictureAdapter.createPicture(DefaultPictureAdapter.java:84)
      	at org.nuxeo.ecm.platform.picture.api.adapters.PictureBlobHolder.setBlob(PictureBlobHolder.java:82)
      	at org.nuxeo.ecm.platform.wi.backend.SimpleBackend.updateDocument(SimpleBackend.java:147)
      	at org.nuxeo.ecm.platform.wi.backend.webdav.WebDavBackendAdapter.updateDocument(WebDavBackendAdapter.java:134)
      	at org.nuxeo.ecm.webdav.resource.FileResource.put(FileResource.java:116)
      

      Jstack

      "http-0.0.0.0-8080-1" daemon prio=10 tid=0x0000000003dbf000 nid=0x14bf runnable [0x00007f7130dad000]
         java.lang.Thread.State: RUNNABLE
      	at java.io.RandomAccessFile.readBytes(Native Method)
      	at java.io.RandomAccessFile.read(RandomAccessFile.java:355)
      	at net.sf.jmimemagic.MagicMatcher.test(MagicMatcher.java:218)
      	at net.sf.jmimemagic.Magic.getMagicMatch(Magic.java:299)
      	at org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService.getMimetypeFromFile(MimetypeRegistryService.java:193)
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.getImageMimeType(ImagingComponent.java:103)
      	at org.nuxeo.ecm.platform.picture.api.adapters.DefaultPictureAdapter.createPicture(DefaultPictureAdapter.java:84)
      	at org.nuxeo.ecm.platform.picture.api.adapters.PictureBlobHolder.setBlob(PictureBlobHolder.java:82)
      	at org.nuxeo.ecm.platform.wi.backend.SimpleBackend.updateDocument(SimpleBackend.java:147)
      	at org.nuxeo.ecm.platform.wi.backend.webdav.WebDavBackendAdapter.updateDocument(WebDavBackendAdapter.java:134)
      	at org.nuxeo.ecm.webdav.resource.FileResource.put(FileResource.java:116)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: