天天看點

搭建skywalking時,elaticsearch填坑記錄

在啟動skywalking後,添加的服務達到一定數量的時候,發現skywalking的ui界面查不到資料。

嘗試更新了skywalking的版本之後在短期内可以看到效果,但過了一段時間之後又查不到資料了。

報錯日志:

搭建skywalking時,elaticsearch填坑記錄

解決方案:

   Skywalking選擇ElasticSearch存儲中可能會遇到以下錯誤,錯誤代碼429。或者ElasticSearch性能問題

Suppressed: org.elasticsearch.client.ResponseException: method [POST], host [http://127.0.0.1:9200], URI [/service_instance_inventory/type/6_tcc-app-gateway-77b98ff6ff-crblx.cards_0_0/_update?refresh=true&timeout=1m], status line [HTTP/1.1 429 Too Many Requests]
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[elasticsearch-0][10.16.9.130:9300][indices:data/write/update[s]]"}],"type":"es_rejected_execution_exception","reason":"rejected execution of [email protected] on EsThreadPoolExecutor[name = elasticsearch-0/write, queue capacity = 200, [email protected]9297ad[Running, pool size = 2, active threads = 2, queued tasks = 200, completed tasks = 147611]]"},"status":429}
        at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:705) ~[elasticsearch-rest-client-6.3.2.jar:6.3.2]
        at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235) ~[elasticsearch-rest-client-6.3.2.jar:6.3.2]
        at org.elasticsearch.client.RestClient.performRequest(RestClient.java:198) ~[elasticsearch-rest-client-6.3.2.jar:6.3.2]
        at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:522) ~[elasticsearch           

将一下的配置添加 

elasticsearch.yml ,根據環境自定修改參數。

#在跟蹤方案中,請考慮至少設定更多。
thread_pool.index.queue_size: 500 
thread_pool.write.queue_size: 500      

https://github.com/apache/skywalking/blob/v6.3.0/docs/en/FAQ/ES-Server-FAQ.md

繼續閱讀