[Cassandra] Mutation of <x> bytes is too large for the maxiumum size of <y>

[Cassandra] Mutation of bytes is too large for the maxiumum size of

Q:

WARN [SharedPool-Worker-4] 2015-11-28 20:04:44,663 AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread Thread[SharedPool-Worker-4,5,main]: {} java.lang.IllegalArgumentException: Mutation of 28087887 bytes is too large for the maxiumum size of 16777216

A:

简单讲是由于Cassandra发现你一次提交的数据太大了,也就是超过commitlog_segment_size_in_mb大小的50%,这个配置的默认值是32MB,如果一次提交的数据超过16MB就会出现这样的问题,尤其是通过batch提交大量数据时。这样做的目的是避免是作为一种保护措施,避免程序Bug导致数据破坏或者对系统造成不良影响。

解决方法之一是修改默认的commitlog_segment_size_in_mb大小,这样做其实不推荐,因为这样违背了设计的初衷,16MB的数据作为一个提交单元已经不小了。
更好的方式是去排查为什么会一次提交这么多数据,如果确定没问题,那么请分批提交这些数据。

posted on 2017-10-05 11:21  eshizhan  阅读(590)  评论(0编辑  收藏  举报