Take the 2-minute tour ×  I am running a web application using
jetty server with maven. The application contains a large pool
of static objects in Lists and Maps contributing to the 2.8GB of
physical memory usage. After several hours, the server hangs
with maximum CPU usage. This happens without any user
interaction or requests made on the server.  I have noticed that
during those several hours, while the server is running fine,
the memory slowly reduces to 1.7GB. My suspicion is that this
could be a garbage collection related issue.     1. Could it be
that GC hangs while erroneously collecting or inspecting my
large object pools and its references?   2. How would I go about
debugging and fixing this issue?  Note that on Windows I do not
have this problem. Once the application starts and fills up its
pool, it occupies 3.4GB and stays exactly the same without ever
crashing.  Server startup and environment:  setenforce 0 export
MAVEN_OPTS="-Xmx5120m -Xms5120m -XX:+UseConcMarkSweepGC
-Xgcthreads1 -XX:MaxGCPauseM