Resolve issues with DoubleCloud Managed ClickHouse®

It may occur that, on a rare occasion, your Managed ClickHouse® service works not as expected. Our experience shows that you can fix a significant portion of these cases without a need to contact technical support.

This article covers the following topics:

Resolve the most frequent issues following the instructions below:

Copy the existing Managed ClickHouse® cluster

To copy your existing ClickHouse® cluster, you can perform one of the following actions:

  • Create a new ClickHouse® cluster and use the Transfer service to replicate the data.

  • Export certain tables into a CSV file using the clickhouse-client with the following query:

    <Native interface connection string> \ 
    --query="SELECT * from <database_name>.<table_name>" > <file_name>.csv
    

After this operation, you can upload this CSV file from your local machine to another DoubleCloud Managed ClickHouse® cluster.

For more information on upload options, see Upload CSV to your Managed ClickHouse® cluster.

Change max query size for your ClickHouse® cluster

You can configure the max query size for your cluster using the clickhouse-client:

  1. Go to the Clusters overview page.

  2. Select the cluster for which you want to change the max query size.

  3. On the cluster's information page, find the Native interface connection string and click Copy.

  4. Paste it into a text editor.

  5. Add the following at the end of your connection string:

    --max_query_size=65536
    

    Note that 65536 is an example of the query size in bytes. Please substitute this number with the desired query size.

  6. Copy the resulting text, paste it into your terminal, and then run it.

There's one more way you can do it.

If you need to change the max query size within a running session, send the following query:

SET max_query_size = 65536

Note that 65536 is an example of the query size in bytes. Please substitute this number with the desired query size.

To permanently change max query size for a single user, send the following query after connecting to your cluster in the clickhouse-client:

ALTER USER <username> SETTINGS max_query_size = 65536

Note that 65536 is an example of the query size in bytes. Please substitute this number with the desired query size.

If you need to set the same max query size for multiple users, consider creating a settings profile with the following query:

CREATE SETTINGS PROFILE max_query_size_profile SETTINGS max_query_size = 65536 TO user1, user2

Note that user1 and user2 are examples of user names to which you want to apply the settings profile, 65536 is an example of the query size in bytes, and max_query_size_profile is an example of the profile name to which you want to apply the max query size.

Substitute those for the desired user names (feel free to use as many names as you need), query size and profile name respectively.

Change the maximum number of result rows

If the result of a query returns an incomplete number of lines, you can configure the maximum number of the lines returned in a query:

  1. Go to the Clusters overview page in the console.

  2. Select the cluster for which you want to change the max query size.

  3. On the cluster's information page, find the Native interface connection string and click Copy.

  4. Paste it into a text editor.

  5. Add the following at the end of your connection string:

    --max_result_rows=32768
    

    Note that 32768 is an example of the number of lines. Please substitute this number for your own desired quantity of lines.

  6. Copy the resulting text, paste it into your terminal, and then run it.

To permanently change max query size for a single user, send the following query after connecting to your cluster in the clickhouse-client:

SET max_result_rows = 32768

Note that 32768 is an example of the number of lines. Please substitute this number for your own desired quantity of lines.