Hi

I am using Tomcat 9.0.52 and 9.0.60 on Windows server 2019 version 1809 (OS 
Build 17763.2686)
The machine has 32Gb of Ram 
Pagefile size 4Gb
The Tomcat service is configured with Xms20g Xmx20g added in the Java 8 
parameters
I am using Amazon corretto 11.0.14

Everything works fine if using Stop / Start in Control Panel > Services 
However if the service is already started and I select Restart, then it stops 
the service but fails to start with 

error 1067: The process terminated unexpectedly.


Hs-err.pid file is created with OutOfMemoryError and:

There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 21474836480 bytes for Failed to 
commit area from 0x0000000300000000 to 0x0000000800000000 of length 21474836480.

If setting Xms and Xmx to 16Gb, it works.
If the pagefile size is increased to 32Gb, then it works also
However we should not need that pagefile as when Tomcat is stopped, only 2.5Gb 
out of the 32Gb are used, and it works just fine if we do the 2 step process of 
Stop and then Start.

Using other application, Zookeeper, does not show this problem, the restart 
works ok even when set to 20Gb, so it seems something with the Tomcat service 
management.

Any help will be appreciated

Thank you
Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to