2.1.1 Updates
* Update psql-app container to use MEM for heap setting This fixes issue where psql-app would run out of memory * Update psql-app container to restart psql consumer if if stops. This handles restart on out of memory exit.
This commit is contained in:
parent
0a0d2ceec1
commit
c5f3d6ef59
@ -100,7 +100,7 @@ services:
|
||||
psql-app:
|
||||
restart: unless-stopped
|
||||
container_name: obmp-psql-app
|
||||
image: openbmp/psql-app:2.1.0
|
||||
image: openbmp/psql-app:2.1.1
|
||||
sysctls:
|
||||
- net.ipv4.tcp_keepalive_intvl=30
|
||||
- net.ipv4.tcp_keepalive_probes=5
|
||||
@ -111,7 +111,7 @@ services:
|
||||
volumes:
|
||||
- ${OBMP_DATA_ROOT}/config:/config
|
||||
environment:
|
||||
- MEM=4 # Set memory to at least 2GB but ideally 4GB
|
||||
- MEM=3 # Set memory to at least 2GB but ideally 4GB
|
||||
- KAFKA_FQDN=obmp-kafka:29092
|
||||
- RPKI_URL=https://rpki.cloudflare.com/rpki.json # define the URL to retrieve json endoed RPKI data
|
||||
- RPKI_PASS=None
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
# Example docker build:
|
||||
# tar -c -C ../../ ./obmp-psql ./obmp-docker/psql-app ./obmp-java-api-message \
|
||||
# | docker buildx build --platform linux/amd64 --progress=plain \
|
||||
# --build-arg VERSION=2.1.0 \
|
||||
# -f obmp-docker/psql-app/Dockerfile -t openbmp/psql-app:2.1.0 -
|
||||
# --build-arg VERSION=2.1.1 \
|
||||
# -f obmp-docker/psql-app/Dockerfile -t openbmp/psql-app:2.1.1 -
|
||||
|
||||
# -----------------------------------------------
|
||||
# stage: Build
|
||||
|
||||
@ -209,11 +209,7 @@ run_consumer() {
|
||||
sed -i -e "s/\([ ]*ssl_mode[ ]*:\)\(.*\)/\1 \"${POSTGRES_SSL_MODE}\"/" /config/obmp-psql.yml
|
||||
fi
|
||||
|
||||
if [[ $MEM -gt 20 ]]; then
|
||||
heap_mem="3g"
|
||||
else
|
||||
heap_mem="1536m"
|
||||
fi
|
||||
heap_mem=${MEM}G
|
||||
|
||||
# Run
|
||||
cd /var/log
|
||||
@ -275,7 +271,13 @@ run_consumer
|
||||
echo "===> Now running!!!"
|
||||
|
||||
while [ 1 ]; do
|
||||
sleep 1800
|
||||
sleep 300
|
||||
pgrep -f obmp-psql-consumer.jar >/dev/null 2>&1
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "PSQL consumer is not running, restarting in 30 seconds"
|
||||
cat /var/log/psql-console.log
|
||||
sleep 30
|
||||
run_consumer
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user