Skip to content

Continuous memory build up #518

Open
@MathiasVDA

Description

@MathiasVDA

Hello,

I'm using the docker image to treat several xml files and get this error after a while: "Java heap space"

I know this is related to insufficient memory available for the java runtime. It seems by default the runtime is limited to 2GB and it's not able to address the GC in time. Or the default 2GB is not enough.

The xml files are 10-30MB, so nothing impressive yet. I use the sparql endpoint available and do multiple executions to build and debug my sparql query. The issue only occurs after a few sparql executions, not immediately.

I managed to solve the issue by setting several java related memory flags. I'm not an expert in this but I think I got it right, since the issue is gone. Below is my docker-compose file that overwrites the default command from the official image.

This is my docker-compose file:

services:
  pgadmin:
    image: facadex/sparql-anything
    container_name: sparql-anything-server-int
    ports:
      - "3000:3000"
    command: ["java", "-Xms2g", "-Xmx4g", "-XX:MaxDirectMemorySize=4g", "-jar", "/app/sparql-anything-server.jar"]
    env_file: 
      - .env
    volumes:
      - ./data/:/data

I'm not sure if something can be done or should be done, since the memory settings depend on the environment of the user. Maybe at least this needs to be documented?

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