1
我在通過PHP從cassandra獲取結果時遇到問題。錯誤是隨機發生的(有時在30次重新載入後,有時連續幾次)。我使用的是DataStax PHP Driver 1.30和PHP 7.0。Cassandra PHP所有I/O線程上的所有連接都很忙
未捕獲的異常遇到 類型的錯誤:卡桑德拉\異常\ RuntimeException的 消息:所有的I/O線程的所有連接都忙
我的連接構造:
$this->cluster = Cassandra::cluster()
>withContactPoints('172.16.0.31')
->build();
$this->session = $this->cluster->connect($this->keyspace);
我的表功能:
$sql = new Cassandra\SimpleStatement("SELECT * FROM {$table}");
$future = $this->session->executeAsync($sql);
$result = $future->get();
return $result;
有誰知道如何解決這個問題?
密鑰空間您連接是存在? –
您是否嘗試啓用永久會話? 'Cassandra :: cluster() - > withPersistentSessions(true)'以及您的其他集羣構建選項。 – Fero