Hi, After a bit debugging and investigation I saw some strange things in mimetype detection. The external library jmimemagic, which is using for detection, in some cases reads entire file(blob) in the memory heap with a call of byte[] buff = new byte[length]; where length is filesize - in my case about 1.5G. So jvm tries to allocate such buffer and throws OutOfMemmory exception. There are a couple of matchers - with fixed type and size where the size of buffer to be read is small - depends of the type - 1,4, 8 bytes, but matchers of type "detector" and "regex" are reading whole the content from file into a buffer in memory. In my case the file is with strange extension and without known mime type.
I saw that 5 months ago for such an issue you already have reported bug NXP-2698. May be using of this library can potentially crash the server on every upload of large files of unknown type. -- Posted by "[email protected]" at Nuxeo Discussions <http://nuxeo.org/discussions> View the complete thread: <http://www.nuxeo.org/discussions/thread.jspa?threadID=2339#6312> _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
