Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Enable Verbose Garbage Collection

Welcome to this hands-on lab, where we will set Tomcat up to use verbose garbage collection. As part of this lab you will also enable parallel garbage collection. It is useful to have verbose garbage collection set, to help you troubleshoot your Tomcat instance and its applications. We are using Apache's Tomcat, a Java-based application platform built around deploying and managing Java Web Applications. The server provided in this lab environment is running Red Hat Enterprise 8 and has Tomcat 9 pre-installed for you. The Tomcat instance is available on port **8080**.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 22, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Test to Ensure You Can Access the Preconfigured Tomcat Instances on Port 8080

    Use the Tomcat server's public IP address and port 8080. Connect to the Tomcat GUI and log in. The username and password to use are the same as what's provided for CLI access.

    To access the server, copy the external IP address and test in your browser by using this IP address and appending the :8080 to it.

    For example, if an IP address shown was 3.92.152.3, then you would put the following into your web browser:

    http://3.92.152.3:8080

    You should see the GUI.

    Note: It may take from 3 to 10 mins after the Hands-On Lab has started before you can access the Tomcat servers on Port 8080.

  2. Challenge

    Configure Tomcat to Use Verbose and Parallel Garbage Collection

    You will need to set options for Tomcat's startup routine so that it uses verbose and parallel garbage collection.

    The options to add to the Tomcat startup file (you may need to create the file) are the following:

    • Verbose garbage collection:
      -verbose:gc
      
    • Parallel Garbage collection:
      -XX:-UseParallelGC
      

    These entries should be exported as CATALINA_OPTS.

  3. Challenge

    Restart Tomcat and Monitor the Logs for GC Messages

    Restart the Tomcat server.

    Check the Tomcat logs for entries relating to garbage collection. The log to look into is the catalina.out log.

    An example verbose log entry might look like the following:

    [2.536s][info][gc] GC(0) Pause Young (Allocation Failure) 66M->7M(1015M) 22.821ms
    
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight