Skip to content

Memory consumption #21

@Paebbels

Description

@Paebbels

I'm running jgraph/export-server.
It easily consumes more then 2 GiB of memory...

Looking at the running processes, only node is active, no drawio (because there is no HTTP request).
Why does a simple webserver with a single REST API endpoint need 2 GiB of RAM?

The container has more then 740 running processes:
Image

The image was modified as follows to add a health state for DockHand:

# check=skip=InvalidDefaultArgInFrom;error=true

ARG PROXY
ARG ORGANISATION
ARG SERVICE
ARG VERSION

FROM ${PROXY}/${ORGANISATION}/${SERVICE}:${VERSION}

# Healthcheck configuration
# --start-period: Grace period for the Java app to start up
# --interval: How often to run the check
# --timeout: How long to wait for a response
# --retries: Number of failures before marking as 'unhealthy'
HEALTHCHECK \
		--start-period=30s \
		--interval=60s \
		--timeout=5s \
		--retries=3 \
  CMD curl \
  	-X POST http://localhost:8000/export \
  	-H "Content-Type: application/x-www-form-urlencoded" \
  	--data-urlencode "format=png" \
  	--data-urlencode "crop=true" \
  	--data-urlencode 'xml=<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.9 Chrome/128.0.6613.186 Electron/32.2.5 Safari/537.36" version="26.0.9"><diagram name="Seite-1" id="Mu_cCO--Y3iCagJ2gyeZ"><mxGraphModel dx="1434" dy="823" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0" /><mxCell id="1" parent="0" /><mxCell id="PYsFUFWKG3I6qdOnpZNn-1" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="40" y="40" width="120" height="80" as="geometry" /></mxCell></root></mxGraphModel></diagram></mxfile>' \
  	--silent \
  	--output /dev/null \
  || exit 1

I'm running my docker containers with resource limits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions