Cassandra CQLSH OperationTimedOut error=Client request timeout. See Session.execute[_async](timeout)
You may want to increment the request timeout (default: 10 seconds), not the connect timeout.
Try:
cqlsh --request-timeout=6000
or add:
[connection]
request_timeout = 6000
to your ~/.cassandra/cqlshrc
file.
Regarding the copy timeout the correct way is to use the PAGETIMEOUT parameter as already pointed.
copy keyspace.table to '/dev/null' WITH PAGETIMEOUT=10000;
Trying to set the --request-timeout=6000 with cqlsh does not help in that situation.
It's not clear which version of Cassandra you're using here so I'm going to assume 3.0.x
The COPY
function is good but not always the best choice (i.e. if you have a lot of data), however for this though you might want to check some of your timeout settings in cassandra
The docs here show a pagetimeout setting too which may help you.
Moving data between two clusters can be done a number of other ways. You could use of any of the following:
- The sstableloader
- One of the drivers like the java driver
- Using spark to copy data from one cluster to another, like in this example
- Using OpsCenter to clone a cluster
- The cassandra bulk loader (I've known a number of people to use this)
Of course #3 and #4 need DSE cassandra but its just to give you an idea. I wasn't sure if you were using Apache Cassandra or Datastax Enterprise Cassandra.
Anyway, hope this helps!