我写了一个kafka连接jar,我得到以下错误:
我在KAFKA_HEAP_OPTS="-Xmx8g"
中提供了kafka-run-class
。另外,对于连接偏移,我提供了50个分区。我作为docker的一部分运行它,并为容器设置了专门设置的8 GB内存。如果要设置任何重要参数以确保不会抛出OOM异常,请告诉我。
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-status"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-4"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-3"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kafka-producer-network-thread | producer-2"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DistributedHerder"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp667346055-26"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-offsets"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "KafkaBasedLog Work Thread - connect-configs"
Exception in thread "org.eclipse.jetty.server.session.HashSessionManager@7d9d0818Timer" java.lang.OutOfMemoryError: Java heap space
2017-10-13 11:50:52,320 ERROR Task METEOSATJDBCSink-0 threw an uncaught and unrecoverable exception during shutdown (org.apache.kafka.connect.runtime.WorkerTask:123)
java.lang.OutOfMemoryError: Java heap space