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_CUparameter to adjust the storage capacity per CU.
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_INDEXparameter and create a new index.For read-intensive scenarios, you can adjust the
MAX_STORAGE_PER_INDEXparameter, 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_INDEXparameter affects only new indexes.
Error three: Query exceeds clause limit
Error message: The
too_many_clauseserror is returned or a message indicating thatmaxClauseCountormax_terms_countis exceeded appears during a query.
Cause: Elasticsearch Serverless does not support increasing the
maxClauseCountormax_terms_countparameters. ThemaxClauseCountparameter limits the total number of clauses in a Bool Query to 1024. When a query exceeds themaxClauseCountlimit, thetoo_many_clauseserror 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
Log on to Kibana. In the left-side navigation pane, go to Stack Management > Security > Roles.
Click Create role and configure the required permissions, such as
manageorkibana_system.
Go to Stack Management > Security > Users and click Create user.
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 consoleis 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/indicesAPI to verify that the index status isgreen.
Solution: To adjust storage limits, modify the
MAX_STORAGE_PER_INDEXparameter for index-level limits, or adjust theMAX_STORAGE_PER_CUandMaxCUparameters 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.