这周性能调优,去Zipkin找找慢的api,发现最近几天的请求都找不到,奇怪。
我们Zipkin的数据是存在elasticsearch里的,所以先去elasticsearch确认数据。
http://localhost:9200/_cat/indices?v&index=zipkin-span-2021*
zipkin-span-2021-01-03
好家伙,最新的数据是1月份的,这都3月份了。
来到服务器,看下es 和 zipkin的 log。
root@qa:/DATA/logs# grep -rin "Exception" ./
java.lang.IllegalArgumentException: Validation Failed: 1: this action would add [10] total shards, but this cluster currently has [994]/[1000] maximum shards open;
elasticsearch默认是1000个shard, 增加shards到3000
curl -X PUT localhost:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "3000" } }'
配置优先级 transient > persistent > elasticsearch.yml