mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
184 stars 417 forks source link

Mapfish on Kubernetes #3282

Closed edwin closed 5 months ago

edwin commented 5 months ago

hi team,

we are currently running Mapfish on Kubernetes environment and seeing intermittent OutOfMemoryError right now we are using below configuration,

resources:
          limits:
            cpu: "3"
            memory: "10000Mi"
          requests:
            cpu: "0.5"
            memory: "5000Mi"

do we have some kind of basic Kubernetes configuration, health check urls, or pod sizing for this kind of deployment?

thank you.

sbrunner commented 5 months ago

Hello, On our Kubernetes we use in prdocution:


    resources:
      requests:
        memory: 3942Mi
        cpu: 1m
      limits:
        memory: 8Gi
        cpu: '2'

With that, we can print A0 in simple cases, but we limit the concurrent jobs to 2 with -DmaxNumberOfRunningPrintJobs=2.

edwin commented 5 months ago

hi @sbrunner thanks for the insight, will try to implement the concurrent job limitation.

edwin commented 5 months ago

hi we found another intermittent error like below,

09:09:09.555 [http-nio-8080-exec-6] WARN o.m.print.servlet.BaseMapServlet - Error while processing request: java.lang.OutOfMemoryError: Java heap space

question : does injecting Xmx or Xms variables within the runtime using CATALINA_OPTS env variables can help to increase the performance of Mapfish?

thank you.

sbrunner commented 5 months ago

I don't say it, but yes, it's necessary to say to java that he should use more memory :-)

edwin commented 5 months ago

got it. 💪🏻