gpt4 book ai didi

elasticsearch - JHipster Elasticsearch无法在Kubernetes上启动

转载 作者:行者123 更新时间:2023-12-03 00:34:48 24 4
gpt4 key购买 nike

尝试在Kubernetes上部署JHipster控制台时,jhipster-elasticsearch-client容器无法启动。该Pod失败,原因为OOMKilled和退出代码137

将默认内存限制从512M增加到1G不能解决问题。

该节点还剩余大量内存:

Non-terminated Pods:         (9 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits
--------- ---- ------------ ---------- --------------- -------------
default gateway-mysql-5c66b69cb6-r84xb 0 (0%) 0 (0%) 0 (0%) 0 (0%)
default jhipster-console-84c54fbd79-k8hjt 0 (0%) 0 (0%) 0 (0%) 0 (0%)
default jhipster-elasticsearch-client-7cb576d5d7-s48mn 200m (10%) 400m (20%) 512Mi (6%) 1Gi (13%)
default jhipster-import-dashboards-s9k2g 0 (0%) 0 (0%) 0 (0%) 0 (0%)
default jhipster-registry-0 0 (0%) 0 (0%) 0 (0%) 0 (0%)
default jhipster-zipkin-6df799f5d8-7fhz9 0 (0%) 0 (0%) 0 (0%) 0 (0%)
kube-system calico-node-hc5p9 250m (12%) 0 (0%) 0 (0%) 0 (0%)
kube-system kube-proxy-cgmqj 0 (0%) 0 (0%) 0 (0%) 0 (0%)
kube-system tiller-deploy-5c688d5f9b-zxnnp 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
CPU Requests CPU Limits Memory Requests Memory Limits
------------ ---------- --------------- -------------
450m (22%) 400m (20%) 512Mi (6%) 1Gi (13%)

最佳答案

Elasticsearch的默认安装配置为1 GB的堆。您可以通过向容器添加ENV变量来配置Docker Elasticsearch内存需求:

- "ES_JAVA_OPTS=-Xms512m -Xmx512m"

相关文件:
  • https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html
  • https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
  • 关于elasticsearch - JHipster Elasticsearch无法在Kubernetes上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51156506/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com