Is there any way to specify clickhouse-client timeout?

I'm inserting a lot of CSV's into Clickhouse database. Sometimes it stucks on one of the files or something is wrong with the remote server I'm inserting to so it waits default amount of time and then outputs that Code: 209. DB::NetException: Timeout exceeded while reading from socket (ip, 300000 ms): while receiving packet from ip:9000: (in query: ...). (SOCKET_TIMEOUT)

Is there any way to specify this timeout so I don't need to wait for 5 minutes? I'm inserting with the script like this:

clickhouse-client --host "Host" --database "db" --port 9000 --user "User" --password "Password" --query "INSERT INTO table FORMAT CSV" < "file.csv"

Solution 1:

You can try --receive_timeout.

There are bunch of timeout options available at clickhouse-client. Check this command:

 clickhouse-client --help | grep timeout