cassandra大表讀寫timeout的配置解決


程序異常如下:Caused by: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write)

原因很顯然是coordinator,就是node沒有及時響應寫完成

解決方法無外乎,減少數據量,提高超時時間

在cassandra.yaml里

# How long the coordinator should wait for writes to complete
write_request_timeout_in_ms: 2000
# How long the coordinator should wait for counter writes to complete
counter_write_request_timeout_in_ms: 5000

將這2項都調大,默認是2s和5s

調整后,重啟節點生效

ps auwx | grep cassandra
sudo kill pid
bin/cassandra

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM