Improve memory
Some checks failed
CI / Check (push) Failing after 2m0s
Build and publish Docker image / build-and-push (push) Successful in 7m36s

This commit is contained in:
Andras Schmelczer 2026-06-04 21:42:21 +01:00
parent d6d20ccd37
commit 843d14b7ba
6 changed files with 110 additions and 4 deletions

View file

@ -39,6 +39,10 @@ VOLUME ["/app/data"]
RUN chown -R appuser:appuser /app
USER appuser
# Fallback for any allocations not served by jemalloc (the binary's global
# allocator, tuned via the baked-in malloc_conf): cap glibc to 2 arenas so freed
# memory coalesces and is returned instead of fragmenting across per-CPU arenas.
ENV MALLOC_ARENA_MAX=2
EXPOSE 8001
HEALTHCHECK --interval=30s --timeout=5s --start-period=120s --retries=3 \
CMD curl -f http://localhost:8001/health || exit 1