What Should I Do When Logs Cannot Be Written to CSS and A High CPU Usage Is Displayed?
Issue
The CSS CPU usage is high, an error message "Elasticsearch Unreachable" is displayed on Logstash, and logs cannot be written to CSS.
Symptom
Logs cannot be written to CSS.
Possible Causes
The customer index has a single shard and the single node is overwhelmed. As a result, after the queuing is full, new jobs are rejected.
Procedure
- Log in to the CSS management console.
- Locate the target cluster and choose More > Cerebro in the Operation column of the cluster.
If the cluster is in security mode, you need to enter the login username and password.
- In Cerebro, view the number of shards in the cluster and metrics such as the CPU, load, head, and dis of each node.
- Analyze the possible causes based on metrics and conduct optimization accordingly.
- Increase the number of queues and reduce rejected jobs by changing the value of write.queue_size.
- Log in to the CSS management console, click the target cluster name to go to the Basic Information page.
- Click Parameter Configurations, search for write.queue_size, and change its value.
If this parameter does not exist, add it in the Customize area. For details, see Configuring Parameters.
- Create indices again to ensure that the number of shards is greater than that of nodes in the cluster.
- Increase the number of queues and reduce rejected jobs by changing the value of write.queue_size.
- If the number of shards and queues are appropriate but the CPU usage and load are still high, you are advised to scale out the node.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.