Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9146685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:48:25+00:00 2026-06-17T10:48:25+00:00

I am running a web application using jetty server with maven. The application contains

  • 0

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.

Questions:

  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:MaxGCPauseMillis=2000 -XX:GCTimeRatio=10"
sudo nohup mvn -D jetty.port=80 jetty:run &

Operating system:

Ubuntu 12.04.1 LTS

Java:

OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

Maven:

Apache Maven 3.0.4

Jetty:

8.1.8.v20121106
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:48:26+00:00Added an answer on June 17, 2026 at 10:48 am

    It’s hard to say if it’s due to incorrect GC that cause the system hang. I think you can make some moves to get more information:

    1. Add -verbose:gc -Xloggc:/home/admin/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps to your JVM arguments, those will help you find more information of GC.
    2. Collecting thread dump regularly to see what’s going on in your application at runtime.
    3. Get a memory dump when the machine is about to die, which can be analyzed by MAT.
    4. When CPU spikes, use top -H -p<pid> to find the dominator threads and spot them in the thread dump, then you can basically find out which line of the code is doing wrong.

    Here is a really good article of How to Analyze Java Thread Dumps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing Java web application running on Linux using embedded Jetty. The
I've implemented a small web-sockets server using jetty, embedded in a larger java application.
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I am developing an MVC application using nHibernate; running through VS's built in web
I've written an rspec test using Watir against a web application and it's running
I am running an web application on IIS 6, Windows Server 2003 and it
I am running a web application using Tomcat and Java Servlets, JSP's, etc. I
I am using GWT2.0.1,when I am running web application then I get following error
Hi I'm developing a web application using a REST web service as server side.
I have a Java Web Application using Spring and running in Glassfish 3.1.2 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.