XWiki started in Docker gets killed after some days

I have setup xwiki 16.3.0 in docker running on Ubuntu 22.04. using the provided guidelines in How to install XWiki using Docker - XWiki
with a MySQL instance running on my host instead of a containerized MySQL.

So far everything’s running smoothly. However, I already encountered multiple times that after some days, the tomcat(?) process seems to commit suicide and tears down the xwiki container with it:

...
...
2024-05-01 10:28:25,533 [XWiki Solr index thread] WARN  o.a.p.p.f.PDType1Font          - Using fallback font LiberationSans for Helvetica
2024-05-01 10:28:25,534 [XWiki Solr index thread] WARN  o.a.p.p.f.PDType1Font          - Using fallback font LiberationSans for Helvetica-Bold
2024-05-01 10:28:25,548 [XWiki Solr index thread] WARN  o.a.p.p.f.PDType1Font          - Using fallback font LiberationSans for Helvetica-Oblique
2024-05-01 10:28:25,571 [XWiki Solr index thread] WARN  o.a.p.p.f.PDType1Font          - Using fallback font LiberationSans for Courier
2024-05-01 10:28:25,744 [XWiki Solr index thread] WARN  o.a.p.p.BaseParser             - Empty COSName at offset 1520425
02-May-2024 05:44:57.026 INFO [Thread-17] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
02-May-2024 05:44:57.045 INFO [Thread-17] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
2024-05-02 05:44:58,461 [Thread-17] INFO  o.x.o.i.s.DefaultOfficeServer  - Open Office instance stopped.
02-May-2024 05:44:58.665 WARNING [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
02-May-2024 05:44:58.667 WARNING [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@17.0.11/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@17.0.11/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
 java.base@17.0.11/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.base@17.0.11/java.lang.Thread.run(Unknown Source)
02-May-2024 05:44:58.668 WARNING [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [searcherExecutor-19-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@17.0.11/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@17.0.11/java.util.concurrent.locks.LockSupport.park(Unknown Source)
 java.base@17.0.11/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source)
 java.base@17.0.11/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
 java.base@17.0.11/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.base@17.0.11/java.lang.Thread.run(Unknown Source)
02-May-2024 05:44:58.668 WARNING [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [searcherExecutor-25-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@17.0.11/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@17.0.11/java.util.concurrent.locks.LockSupport.park(Unknown Source)
 java.base@17.0.11/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ForkJoinPool.unmanagedBlock(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ForkJoinPool.managedBlock(Unknown Source)
 java.base@17.0.11/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
 java.base@17.0.11/java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.base@17.0.11/java.lang.Thread.run(Unknown Source)
02-May-2024 05:44:58.669 WARNING [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@17.0.11/java.lang.Object.wait(Native Method)
 java.base@17.0.11/java.lang.ref.ReferenceQueue.remove(Unknown Source)
 com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:93)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 java.base@17.0.11/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 java.base@17.0.11/java.lang.Thread.run(Unknown Source)
02-May-2024 05:44:58.670 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1ad39ea7]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.671 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.671 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.672 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.673 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2fd7fbb9]) and a value of type [java.util.Stack] (value [[org.xwiki.context.ExecutionContext@748bf5a1]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.673 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@11d7ad69]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.674 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@2a404dbc]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.674 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@68056958]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.677 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@298380d1]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.677 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@18605f0]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.677 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@420ae331]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.678 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@2f9c8d29]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.678 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@1a2c1503]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.678 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@2bb42a33]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.678 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@3e32471f]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.678 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@758c7035]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.679 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@ff2f78a]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.679 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@51db1f5]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.682 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@29bb14f6]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.682 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@3fa0c42c]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.682 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@27f62af5]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@4f0ca5e7]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@3ee11454]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7d37f60a]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletResponse@7592600]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1cd86d9]) and a value of type [java.util.Stack] (value [[org.xwiki.container.servlet.ServletRequest@116e159c]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.683 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.684 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.684 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.684 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.684 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.685 SEVERE [Thread-17] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2cff451d]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
02-May-2024 05:44:58.730 INFO [Thread-17] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
02-May-2024 05:44:58.754 INFO [Thread-17] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]

My docker-compose.yaml exposing xwiki via a traefik reverse proxy:

version: '2'
services:
  web:
    image: "xwiki:stable-mysql-tomcat"
    restart: unless-stopped
    container_name: xwiki
    environment:
      - DB_USER=xwiki
      - DB_PASSWORD=xxxxxxxxx
      - DB_HOST=192.168.0.1
    volumes:
      - /srv/xwiki:/usr/local/xwiki
    networks:
      - traefik
    labels:
        - "traefik.enable=true"
        - "traefik.http.routers.xwiki.rule=Host(`xxxxxxxxxx`)"
        - "traefik.http.routers.xwiki.entrypoints=web"
        - "traefik.http.routers.xwiki_secure.rule=Host(`xxxxxxxx`)"
        - "traefik.http.routers.xwiki_secure.entrypoints=websecure"
        - "traefik.http.routers.xwiki_secure.tls=true"
        - "traefik.http.services.xwiki.loadbalancer.server.port=8080"

networks:
  traefik:
    external: true

I’d say, there is nothing extra-ordinary in here, which could explain why the container crashes after some days?

The loglines shown above is the last thing which gets logged before the container just vanishes.
I can restart the container without problem afterwards.

Any idea what might be causing the problem?

From the log I’ve quoted above, it seems that Tomcat is stopping. You need to find what this is. What’s sure is that if Tomcat is stopping then XWiki is stopping (since it’s deployed inside of Tomcat). The warnings you see are “normal” (XWiki currently doesn’t support stopping cleanly in Tomcat, which isn’t a problem, you just need to not “restart” XWiki but to stop Tomcat and start it again).

Maybe it’s the restart: unless-stopped config that does this. Somehow the container doesn’t respond and it tries to restart it.

Maybe dmesg and / or journalctl have some more informations.

Hm, it didn’t crash/stop by now again, but I am just seing:

root@a67517937144:/usr/local/tomcat# ps aux | grep java
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  4.2  7.0 5182032 2323564 ?     Ssl  05:46  18:55 /opt/java/openjdk/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Djava.security.egd=file:/dev/./urandom -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start

and top gives me:

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
      1 root      20   0 5182032   2.2g  22024 S   0.3   7.1  18:56.24 java

So it’s using 2.2g physical mem if I am not mistaken? Wouldn’t that be in contradiction to “-Xmx1024m”?

Are those values that I see expected?

Not necessarily, see jvm - Java consumes memory more than Xmx argument - Stack Overflow