...
No Format |
---|
$ java -Dlog4j.configuration=file:log4j_server.xml -jar tika-server-x.x.jar -spawnChild -JXmx4g -JDlog4j.configuration=file:log4j_child.xml}} |
NOTE 2: We Before Tika 1.27, we strongly encourage -JXX:+ExitOnOutOfMemoryError
, which admittedly has limitations: https://bugs.openjdk.java.net/browse/JDK-8155004. When a JVM is struggling with memory, it is possible that the final trigger for the OOM happens in reading bytes from the client or writing bytes to the client NOT during the parse. In short, OOMs can happen outside of Tika's code, and our internal watcher can't see/respond to some OOMs. In 1.27 and later (and in 2.x), we added a shutdown hook in TesseractOCRParser to decrease the chances of orphaning tesseract. The use of -JXX:+ExitOnOutOfMemoryError
prevents the shutdown hooks from working, and tesseract processes may more easily be orphaned on an out of memory error.
NOTE 3: When using the -spawnChild
option, clients will need to be aware that the server could be unavailable temporarily while it is restarting. Clients will need to have a retry logic.
...