Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous memory build up #518

Open
MathiasVDA opened this issue Dec 23, 2024 · 0 comments
Open

Continuous memory build up #518

MathiasVDA opened this issue Dec 23, 2024 · 0 comments

Comments

@MathiasVDA
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant