Container based on xwiki:lts-postgres-tomcat does not start reliable

Hi,
I have xwiki with the above mentioned image running. I always had problems, that after a restart the container does not start reliable. It often hangs at 500-700MB. Once it reaches > 800MB of memory usage I can access the GUI and memory usage continues to grow to 2GB. Usually it takes 2-10 attempts to get the container started. Since a couple of month I even need up to 30 attempts. I am using a script for that.
Any idea why this happens or how to find a root cause?
Running on Debian 11 on amd64. Docker version: docker-ce 5:23.0.1-1~debian.11~bullseye
Logs do not give a clue to me. Same logs as when completely starting, but not complete.
Here the last lines:

2023-02-11 14:45:13,012 [main] WARN  o.e.j.u.s.S.config             - Trusting all certificates configured for Client@721fbae2[provider=null,keyStore=null,trustStore=null] 
2023-02-11 14:45:13,013 [main] WARN  o.e.j.u.s.S.config             - No Client EndPointIdentificationAlgorithm configured for Client@721fbae2[provider=null,keyStore=null,trustStore=null] 
2023-02-11 14:45:13,557 [main] WARN  o.e.j.u.s.S.config             - Trusting all certificates configured for Client@71fff0b[provider=null,keyStore=null,trustStore=null] 
2023-02-11 14:45:13,558 [main] WARN  o.e.j.u.s.S.config             - No Client EndPointIdentificationAlgorithm configured for Client@71fff0b[provider=null,keyStore=null,trustStore=null] 
2023-02-11 14:45:13,742 [main] WARN  o.a.s.c.CoreContainer          - Not all security plugins configured!  authentication=disabled authorization=disabled.  Solr is only as secure as you make it. Consider configuring authentication/authorization before exposing Solr to users internal or external.  See https://s.apache.org/solrsecurity for more info 

Thanks

Do you have unsent emails in the perm dir?

The best to know what’s happening if it hangs is to do a thread dump during the hanging and then to provide that stack here.

Thanks

Had indeed some unsent emails. Fixed it. Will the if it caused the issue.
Thanks!!!

ok so it was trying to resend them at startup. You can disable this feature if you wish, see Mail Sender Storage API (XWiki.org)

Sorry, but where/how do I set these properties?

In xwiki.properties.

Perfect. Thanks.

Sorry, for beeing a bit blind :wink:

Unfortunately this did not work.

Trying now this:
https://jira.xwiki.org/browse/XWIKI-18436?focusedId=108620&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-108620

from here

Will see if this works.