druid icon indicating copy to clipboard operation
druid copied to clipboard

Peon OOM causes task to never terminate

Open drcrallen opened this issue 11 years ago • 9 comments

OOMs in the form of

11996.553: [GC concurrent-mark-abort]
Exception in thread "plumber_merge_0" java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3236)
    at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:191)
    at io.druid.segment.data.GenericIndexed.fromIterable(GenericIndexed.java:110)
    at io.druid.segment.data.CompressedVSizeIntsIndexedSupplier.fromList(CompressedVSizeIntsIndexedSupplier.java:197)
    at io.druid.segment.CompressedVSizeIndexedSupplier.fromIterable(CompressedVSizeIndexedSupplier.java:118)
    at io.druid.segment.IndexIO$DefaultIndexIOHandler.convertV8toV9(IndexIO.java:726)
    at io.druid.segment.IndexMerger.makeIndexFiles(IndexMerger.java:933)
    at io.druid.segment.IndexMerger.merge(IndexMerger.java:336)
    at io.druid.segment.IndexMerger.mergeQueryableIndex(IndexMerger.java:218)
    at io.druid.segment.IndexMerger.mergeQueryableIndex(IndexMerger.java:207)
    at io.druid.segment.realtime.plumber.RealtimePlumber$4.doRun(RealtimePlumber.java:444)
    at io.druid.common.guava.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:40)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

can cause the indexing service's realtime plumber to fail and never recover, leaving the task in a state where it never persists and never exits.

drcrallen avatar Sep 08 '15 16:09 drcrallen

One potential solution is http://stackoverflow.com/a/12096648 and setting -XX:OnOutOfMemoryError="kill -9 %p"

drcrallen avatar Sep 08 '15 16:09 drcrallen

The prior solution does not work well because javaOpts cannot accept arguments with spaces.

drcrallen avatar Sep 17 '15 14:09 drcrallen

we do use -XX:OnOutOfMemoryError="kill -9 %p" on our servers.

himanshug avatar Sep 17 '15 14:09 himanshug

@himanshug Do you specify that with javaOpts for the peons?

drcrallen avatar Sep 17 '15 14:09 drcrallen

I suppose you could make it part of javaCommand

drcrallen avatar Sep 17 '15 14:09 drcrallen

ah sorry, I spoke too soon, we actually do it only for the druid processes right now and not for peons (peons never complained so far, it was mostly an issue at the brokers time to time)

himanshug avatar Sep 17 '15 19:09 himanshug

The prior solution does not work well because javaOpts cannot accept arguments with spaces.

what's your jdk version? it is invaild for jdk8. BTW, if peon is killed , the data in memory also dropped? @drcrallen

licl2014 avatar Sep 04 '18 12:09 licl2014

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar May 15 '23 00:05 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Jun 12 '23 00:06 github-actions[bot]