Skip to content

Commit

Permalink
Limiting metrics' JVM to match resource limits. Still getting OOMKill…
Browse files Browse the repository at this point in the history
…ed though, but maybe half as often.
  • Loading branch information
solsson committed Jun 28, 2017
1 parent b3c6cd2 commit 53b2cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ kubectl exec -c broker kafka-0 -- /bin/sh -c 'apk add --no-cache curl && curl ht
kubectl logs -c metrics zoo-0
kubectl exec -c zookeeper zoo-0 -- /bin/sh -c 'apk add --no-cache curl && curl http://localhost:5556/metrics'
```
Metrics containers can't be used for the curl because they're too short on memory.
5 changes: 3 additions & 2 deletions zookeeper/51zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
image: solsson/kafka-prometheus-jmx-exporter@sha256:1f7c96c287a2dbec1d909cd8f96c0656310239b55a9a90d7fd12c81f384f1f7d
command:
- java
- -Xms39M
- -Xmx99M
- -jar
- jmx_prometheus_httpserver.jar
- "5556"
Expand All @@ -41,9 +43,8 @@ spec:
value: "5555"
command:
- /bin/bash
- -c
- -euc
- >
set -e;
export ZOOKEEPER_SERVER_ID=$((${HOSTNAME##*-} + 4));
echo "${ZOOKEEPER_SERVER_ID:-1}" | tee /var/lib/zookeeper/data/myid;
sed -i "s/server\.$ZOOKEEPER_SERVER_ID\=[a-z0-9.-]*/server.$ZOOKEEPER_SERVER_ID=0.0.0.0/" config/zookeeper.properties;
Expand Down

0 comments on commit 53b2cb5

Please sign in to comment.