Description
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?