dougcain
03/02/2023, 12:40 PMbdw429s
03/02/2023, 3:27 PMdougcain
03/02/2023, 3:31 PMbdw429s
03/02/2023, 4:46 PMdougcain
03/02/2023, 4:47 PMdougcain
03/02/2023, 4:49 PMdougcain
03/03/2023, 10:34 AMbdw429s
03/03/2023, 3:11 PMjclausen
03/03/2023, 4:00 PMdougcain
03/03/2023, 4:09 PMjclausen
03/03/2023, 5:03 PM-Xms
argument. If you use just jvm.heapSize
in your server.json
then that is the max but no min is set. So the heap starts low and then grows. The min heap also has an impact on every thread, if you set that argument.
Here’s an example of a Forgebox container, which has a max heap size of 1.5G, no min, for a lifecycle of 1 hour. You can see the non-heap space grows over time, as do the number of threads. These are coming from multiple sources - Lucee, Coldbox, Custom Scheduler threads, Elastic APM, etc. Based on these metrics, I wouldn’t feel comfortable running this application with a memory limit under 2GB. We set the container to a to 2.5 limit, in production to be safe.dougcain
03/03/2023, 5:05 PMjclausen
03/03/2023, 5:06 PMonApplicationEnd
method in the Application.cfc
( see the coldbox templates ) to make sure those scheduler threads are not orphaned when the Application restarts. Either that, or you should set a CFCONFIG_APPLICATIONTIMEOUT=365,0,0,0
environment variable to ensure that application never restarts/orphans threads