Hi there, do you have any hint for me how to incre...
# orm-help
p
Hi there, do you have any hint for me how to increase the maximum java heap size via
prisma-server.yml
or
Dockerfile
? It seems the current maximum is 2GB, but the server has 4GB available. Didn't find any solution so far, thanks 🙂
p
You are looking for Prisma1 or Prisma2. Because I'm looking for this answer too, but for Prisma1. I using docker-compose prisma:1.34.8
r
Hey @Philipp 👋 Could you try something like this:
Copy code
version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.34.10
    restart: always
    ports:
      - '4466:4466'
    environment:
      JAVA_OPTS: '-Xmx1350m'
      PRISMA_CONFIG: |
        port: 4466
        databases:
          default:
            connector: postgres
            host: host.docker.internal
            database: dbname
            schema: schema
            user: username
            password: password
            ssl: false
            rawAccess: true
            port: '5432'
            migrations: true
The
JAVA_OPTS
value should do the trick.
p
@Pedro Jardim for Prisma1. I ended up with a Dockerfile like this:
Copy code
FROM prismagraphql/prisma:1.34.10
COPY prisma-server.yml /
ENV _JAVA_OPTIONS -Xmx6144m
ENV PRISMA_CONFIG_PATH /prisma-server.yml
Approach of Ryan should have the same effect, however don't know if the leading underscore makes a difference. Seems to work for our servers.
👍 1
p
@Ryan I tried this approach, with no successes. Ohhh but I have used not single cotes. maybe that way not work, going to try this one
I'v try to pass: JAVA_OPS: '-Xms2048m -Xmx2048m -XX:PermSize=64m -XX:MaxPermSize=384m' on the JAVA_OPTS, then when I docker up, and input the docker stats command, nothing changed =/ I'm using a 4Gb machine, and prisma is using 305mb.