网站首页 / 资讯 / Magento文档/ Magento2.x文档

Opensearch或是Elasticsearch防止爬虫恶意采集较大数量时CPU过载

作者:admin
#!/bin/bash
# 自动配置脚本
curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "search.max_buckets": 10000,
    "indices.query.bool.max_clause_count":1024
  }
}'

如有开启安全密码可以用

curl -u admin:your_password -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "search.max_buckets": 10000,
    "indices.query.bool.max_clause_count": 1024
  }
}'

验证结果用以下命令

curl -s -X GET "localhost:9200/_cluster/settings?include_defaults=true&flat_settings=true" | grep -E "max_buckets|max_clause_count"


标签:
上一篇:Magento2 Varnish 经常性503解决方法
下一篇:没有了

相关内容

最近更新
相关产品
综合服务邮箱: magento2#foxmail.com