Apache Tika不断死亡

时间:2018-12-20 20:24:34

标签: java memory-leaks apache-tika java-memory-leaks tika-server

我正在使用openEdgar来分析SEC文件数据,并且它使用Apache Tika来分析HTML,XML和LBRL内容。我正在具有4G内存的盒子上运行它,它一直在使我丧命。

我最终是以这种方式启动的:

  

java -Dlog4j.configuration = file:log4j.xml -jar tika-server-1.19.1.jar -spawnChild

在日志中,我看到它最终将无法对子进程执行ping操作,并且事情从那里走下坡路,并且JVM将死于内存不足而无法继续:

2018-12-20 19:17:29 DEBUG WriteFlusher:434 - Flushed=true written=32776 remaining=0 WriteFlusher@575678bd{WRITING}->null
2018-12-20 19:42:25 INFO  TikaServerCli:115 - Starting Apache Tika 1.19.1 server
2018-12-20 19:49:37 WARN  TikaServerWatchDog:191 - Exception pinging child process
    ...java.io.IOException: Stream closed
2018-12-20 19:49:37 WARN  TikaServerWatchDog:213 - Exception asking child to shutdown
    ...java.io.IOException: Stream closed
2018-12-20 19:49:37 WARN  TikaServerWatchDog:225 - Problem shutting down writer to child
   ...java.io.IOException: Stream closed
2018-12-20 19:49:37 INFO  TikaServerWatchDog:97 - About to restart the child process
2018-12-20 19:49:40 INFO  TikaServerWatchDog:99 - Successfully restarted child process -- 1 restarts so far)
2018-12-20 19:53:15 WARN  TikaServerWatchDog:197 - Received status from child: TIMEOUT
2018-12-20 19:53:20 WARN  TikaServerWatchDog:213 - Exception asking child to shutdown
    ...java.io.IOException: Stream closed
2018-12-20 19:53:20 WARN  TikaServerWatchDog:225 - Problem shutting down writer to child
    ...java.io.IOException: Stream closed
2018-12-20 19:53:20 INFO  TikaServerWatchDog:97 - About to restart the child process
2018-12-20 19:53:34 INFO  TikaServerWatchDog:99 - Successfully restarted child process -- 2 restarts so far)
2018-12-20 19:55:00 WARN  TikaServerWatchDog:202 - Exception receiving status from child
java.lang.ArrayIndexOutOfBoundsException: 35 is not acceptable for an array of length 6
2018-12-20 19:55:08 ERROR TikaServerCli:120 - Can't start: 
    java.io.IOException: Unrecognized status code; message:
    #
    # There is insufficient memory for the Java Runtime Environment to continue.
    # Native memory allocation (mmap) failed to map 65536 bytes for committing reserved memory.

还有什么我可以做的,以了解其根本原因并有可能解决吗?

0 个答案:

没有答案