Python – cql – Cassandra 1.2 – 读取时的rpc超时
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Python – cql – Cassandra 1.2 – 读取时的rpc超时,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3267字,纯文字阅读大概需要5分钟。
内容图文
![Python – cql – Cassandra 1.2 – 读取时的rpc超时](/upload/InfoBanner/zyjiaocheng/785/b1993693c5464546bd14805c36ac6a43.jpg)
我有一个使用Cassandra 1.2集群的Python应用程序.群集有7个使用虚拟节点的物理节点,1个密钥空间的复制因子为3,复制因子为1.该应用程序使用cql库连接到Cassandra并运行查询.问题是我在尝试在数据库上运行选择时开始出错,我收到此错误:
Request did not complete within rpc_timeout
当我检查集群的状态时,我可以看到我的一个节点的cpu使用率超过100%并检查Cassandra system.log我可以看到这种情况一直突然出现:
INFO [ScheduledTasks:1] 2013-06-07 02:02:01,640 StorageService.java (line 3565) Unable to reduce heap usage since there are no dirty column families
INFO [ScheduledTasks:1] 2013-06-07 02:02:02,642 GCInspector.java (line 119) GC for ConcurrentMarkSweep: 630 ms for 1 collections, 948849672 used; max is 958398464
WARN [ScheduledTasks:1] 2013-06-07 02:02:02,643 GCInspector.java (line 142) Heap is 0.9900367202591844 full. You may need to reduce memtable and/or cache sizes. Cassandra will now flush up to the two largest memtables to free up memory. Adjust flush_largest_memtables_at threshold in cassandra.yaml if you don't want Cassandra to do this automatically
INFO [ScheduledTasks:1] 2013-06-07 02:02:02,685 StorageService.java (line 3565) Unable to reduce heap usage since there are no dirty column families
INFO [ScheduledTasks:1] 2013-06-07 02:02:04,224 GCInspector.java (line 119) GC for ConcurrentMarkSweep: 1222 ms for 2 collections, 931216176 used; max is 958398464
WARN [ScheduledTasks:1] 2013-06-07 02:02:04,224 GCInspector.java (line 142) Heap is 0.9716378009554072 full. You may need to reduce memtable and/or cache sizes. Cassandra will now flush up to the two largest memtables to free up memory. Adjust flush_largest_memtables_at threshold in cassandra.yaml if you don't want Cassandra to do this automatically
INFO [ScheduledTasks:1] 2013-06-07 02:02:04,225 StorageService.java (line 3565) Unable to reduce heap usage since there are no dirty column families
INFO [ScheduledTasks:1] 2013-06-07 02:02:05,226 GCInspector.java (line 119) GC for ConcurrentMarkSweep: 709 ms for 1 collections, 942735576 used; max is 958398464
WARN [ScheduledTasks:1] 2013-06-07 02:02:05,227 GCInspector.java (line 142) Heap is 0.9836572275641711 full. You may need to reduce memtable and/or cache sizes. Cassandra will now flush up to the two largest memtables to free up memory. Adjust flush_largest_memtables_at threshold in cassandra.yaml if you don't want Cassandra to do this automatically
INFO [ScheduledTasks:1] 2013-06-07 02:02:05,229 StorageService.java (line 3565) Unable to reduce heap usage since there are no dirty column families
INFO [ScheduledTasks:1] 2013-06-07 02:02:06,946 GCInspector.java (line 119) GC for ConcurrentMarkSweep: 1271 ms for 2 collections, 939532792 used; max is 958398464
WARN [ScheduledTasks:1] 2013-06-07 02:02:06,946 GCInspector.java (line 142) Heap is 0.980315419203343 full. You may need to reduce memtable and/or cache sizes. Cassandra will now flush up to the two largest memtables to free up memory. Adjust flush_largest_memtables_at threshold in cassandra.yaml if you don't want Cassandra to do this automatically
关于如何解决这个问题的任何想法?
提前致谢!
解决方法:
看起来Cassandra JVM堆大小可能太小,只有1Gb:
max is 958398464
假设您的节点上有可用内存,我建议将堆增加到至少2Gb.
请参阅cassandra-env.sh以了解如何计算JVM堆分配或手动将其设置为特定值.
内容总结
以上是互联网集市为您收集整理的Python – cql – Cassandra 1.2 – 读取时的rpc超时全部内容,希望文章能够帮你解决Python – cql – Cassandra 1.2 – 读取时的rpc超时所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。