php – Cassandra“操作超时 – 只收到0回复.”写作期间
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了php – Cassandra“操作超时 – 只收到0回复.”写作期间,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1889字,纯文字阅读大概需要3分钟。
内容图文
![php – Cassandra“操作超时 – 只收到0回复.”写作期间](/upload/InfoBanner/zyjiaocheng/740/016f9185b53b46c8b692b9cd95d47069.jpg)
我在Windows 10上使用Datastax PHP Cassandra Driver和Cassandra 2.2.5.这是一个单节点集群,并且密钥空间复制
{
'class': 'SimpleStrategy',
'replication_factor': 1
}
这是我要插入的表:
CREATE TABLE MyDocuments (
"label" varchar,
"fileName" varchar,
"blob" blob,
"createdTime" bigint,
"lastUpdateTime" bigint,
PRIMARY KEY("label", "fileName")
);
当我尝试插入一个16419KB大的blob行时,它给了我这个错误消息操作超时 – 只收到0个响应.
根本没有插入行.
插入一个16379KB blob的行工作正常.
日志文件不显示任何内容.操作失败时,Datastax / Cassandra文件夹中的任何日志文件都不会附加任何内容.
经过几个小时的谷歌搜索,我仍然不知道为什么会发生这种情况.我已经尝试在设置(cassandra.yaml)中将write_request_timeout_in_ms增加到20000,但它没有帮助.
有人知道为什么当大小超过~16MB时,写入似乎以这种方式失败?
更新:
我将Cassandra更新为v3.7,观察结果相同,但错误信息现在显示操作失败 – 收到0响应和1次失败.
解决方法:
您需要将commitlog_segment_size_in_mb增加到更高的值.请尝试64MB.
它会增加提交记录段的大小.此属性确定最大突变大小(max_mutation_size_in_kb),定义为段大小的一半.默认情况下为32MB,这使得您的记录溢出了最大突变大小.
从docs:
(Default: 32MB) Sets the size of the individual commitlog file
segments. A commitlog segment may be archived, deleted, or recycled
after all its data has been flushed to SSTables. This amount of data
can potentially include commitlog segments from every table in the
system. The default size is usually suitable for most commitlog
archiving, but if you want a finer granularity, 8 or 16 MB is
reasonable.This property determines the maximum mutation size, defined as half
the segment size. If a mutation’s size exceeds the maximum mutation
size, the mutation is rejected. Before increasing the commitlog
segment size of the commitlog segments, investigate why the mutations
are larger than expected. Look for underlying issues with access
patterns and data model, because increasing the commitlog segment size
is a limited fix.
内容总结
以上是互联网集市为您收集整理的php – Cassandra“操作超时 – 只收到0回复.”写作期间全部内容,希望文章能够帮你解决php – Cassandra“操作超时 – 只收到0回复.”写作期间所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。