Thursday, October 13, 2016

How to fix OperationTimedOut when using cqlsh query large dataset

cqlsh:mykeyspace2> select d,min(e),max(e) from mykeyspace.t1;
OperationTimedOut: errors={'127.0.0.1': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1


[donghua@localhost cluster]$ touch  ~/.cassandra/cqlshrc

[donghua@localhost cluster]$ cat  ~/.cassandra/cqlshrc
[connection]
client_timeout = 3600 # default is 10 seconds
# Can also be set to None to disable:
# client_timeout = None

[donghua@localhost cluster]$ cqlsh
Connected to SingleServer Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.
cqlsh> select d,min(e),max(e) from mykeyspace.t1;

 d | system.min(e) | system.max(e)
---+---------------+---------------
 5 |       1.00033 |     159.99989

(1 rows)

No comments:

Post a Comment