Elasticsearch Serverless FAQ

更新时间:
复制 MD 格式

This FAQ addresses common Elasticsearch Serverless errors related to storage capacity and query clause limits, and answers questions about Kibana user management and index creation.

Error one: App storage exceeds limit

  • Error message: "app storage exceed limit, app current size: xx GB app limit size: yy GB refer to: MAX_STORAGE_PER_CU and maxCu"

  • Cause: The storage capacity of the current app has reached its limit.

  • Solution:

    • You can increase the maximum number of CUs (MaxCU) to automatically increase the storage capacity. By default, the ratio of CUs to storage capacity is 1:40. For example, if the maximum number of CUs is 2, the default storage capacity is 80 GB.

    • You can modify the MAX_STORAGE_PER_CU parameter to adjust the storage capacity per CU.

Important

Increasing the value of MAX_STORAGE_PER_CU can degrade query and write performance. Adjust this parameter with caution.

Error two: Index storage exceeds limit

  • Error message: "index storage exceed limit, index current size: xx GB index limit size: yy GB refer to: index storage"

  • Cause: The storage capacity of the current index has reached its limit.

  • Solution:

    • You can increase the storage capacity limit for the index.

    • You can adjust the MAX_STORAGE_PER_INDEX parameter and create a new index.

    • For read-intensive scenarios, you can adjust the MAX_STORAGE_PER_INDEX parameter, create a new index, use an alias to associate the old and new indexes, and then write data to the new index.

    • The MAX_STORAGE_PER_INDEX parameter affects only new indexes.

Error three: Query exceeds clause limit

  • Error message: The too_many_clauses error is returned or a message indicating that maxClauseCount or max_terms_count is exceeded appears during a query.

  • Cause: Elasticsearch Serverless does not support increasing the maxClauseCount or max_terms_count parameters. The maxClauseCount parameter limits the total number of clauses in a Bool Query to 1024. When a query exceeds the maxClauseCount limit, the too_many_clauses error is triggered.

  • Solution:

Use one of the following alternatives to optimize the query logic and avoid exceeding the limit:

  • Alternative 1: Replace Bool should clauses with a terms query

Replace should clauses built in a loop with a single terms query. A terms query counts as only one clause at the Lucene level, so it stays within the maxClauseCount limit of 1024. A single terms query supports a default upper limit of 65,536 values. Example:

{
  "terms": {
    "key.keyword": ["value1", "value2", "value3"]
  }
}
  • Alternative 2: Split the query

Split a large term array into multiple smaller arrays (each containing no more than 1024 terms) and combine the results of multiple sub-queries by using the should clauses of a Bool Query.

  • Alternative 3: Use the Terms Lookup mechanism

Extract field values from a document in another index as query conditions to avoid hard-coding large arrays in the query body.

If your business requires increasing the maxClauseCount or max_terms_count limits, we recommend that you migrate to Elasticsearch PaaS, which supports customizing these parameters.

FAQ one: Add custom users in Kibana

  • Problem: How do I add custom users in the Kibana of Elasticsearch Serverless? Why is the Security menu not visible under Stack Management?

  • Solution:

Add custom users

  1. Log on to Kibana. In the left-side navigation pane, go to Stack Management > Security > Roles.

  1. Click Create role and configure the required permissions, such as manage or kibana_system.

  1. Go to Stack Management > Security > Users and click Create user.

  1. Specify the username and password, and assign the role that you created in step 2.

Security menu not visible

If the Security menu is not visible under Stack Management, or features under the menu are disabled, the account that you use to log on to Kibana has insufficient permissions. Log on to Kibana by using the administrator account that was specified when the application was created. This account has administrative permissions to create roles and users.

FAQ two: Index creation warning

  • Problem: When creating an index in Elasticsearch Serverless, the warning ElasticsearchWarning: current index has max storage limit which can be confirmed in aliyun console is returned. Does this affect the use of the index?

  • Cause: This warning is expected behavior and does not affect index creation or usage. Elasticsearch Serverless sets a default storage limit for each index. The default limit for a single index is 20 GB. The default storage limit at the application level is 100 GB. When you create an index, the system returns this warning to inform you that a maximum storage limit exists for the index. The index is still created. You can run the _cat/indices API to verify that the index status is green.

  • Solution: To adjust storage limits, modify the MAX_STORAGE_PER_INDEX parameter for index-level limits, or adjust the MAX_STORAGE_PER_CU and MaxCU parameters for application-level limits. You can view the current storage usage and limit configurations on the application details page of Elasticsearch Serverless in the Alibaba Cloud console.