Next Practical Step
Run your test in CLI mode with jmeter -n -t plan.jmx -l results.jtl and verify that jmeterengine.force.system.exit=true is set.
Troubleshoot JMeter GUI freezing, 100% CPU utilization on load generators, and CLI tests hanging at completion with thread dumps and JVM tuning.
You encounter one of the following performance bottlenecks on the load generator machine:
| Symptom | Primary Cause | Why it happens |
|---|---|---|
| GUI Freeze | Listeners in GUI | View Results Tree stores full XML/JSON response payloads in RAM, blocking UI threads |
| 100% CPU | Inefficient RegEx / Groovy | Complex regex patterns with catastrophic backtracking, or recompiling Groovy scripts |
| 100% CPU | Continuous Garbage Collection | Java Heap nearly full, triggering back-to-back Full GC pauses |
| CLI Hang | Non-daemon active threads | Custom plugins, Backend Listeners (InfluxDB/Kafka), or open JDBC pools blocking process exit |
| CLI Hang | Remote RMI engines | Distributed testing controller waiting for unresponsive worker nodes |
Never use the JMeter GUI for actual load generation. Use GUI strictly for test plan creation and debugging with 1–2 virtual users:
# Standard Non-GUI execution commandjmeter -n -t testplan.jmx -l results.jtl -j jmeter.logWhen a CLI test hangs or freezes, take a thread dump to identify the exact blocking thread:
# 1. Find the JMeter process IDjps -v | grep ApacheJMeter
# 2. Capture the stack trace of all running threadsjstack <PID> > thread_dump.txtLook for threads in the RUNNABLE or BLOCKED state:
BackendListener or InfluxDBRawData: Waiting for remote metrics flush.StandardJMeterEngine: Waiting for lingering worker threads to exit.HikariPool / JDBC: Open database connection pool connections.If a third-party plugin or listener leaves background non-daemon threads open, configure JMeter to force JVM exit when the test finishes:
Add to bin/user.properties or pass via CLI:
# Force JVM exit (System.exit(0)) when engine finishes testjmeterengine.force.system.exit=true
# Maximum time (in milliseconds) to wait for threads to stop on shutdownjmeterengine.threadstop.wait=5000Writing verbose debug logs during a 1,000 RPS test saturates disk I/O and locks CPU threads:
jmeter.log level is set to INFO or WARN in bin/log4j2.xml.results.jtl:# Keep JTL output minimal for maximum throughputjmeter.save.saveservice.output_format=csvjmeter.save.saveservice.response_data=falsejmeter.save.saveservice.samplerData=falsejmeter.save.saveservice.requestHeaders=falsejmeter.save.saveservice.url=truejmeter.save.saveservice.response_code=true| Resource | Use when |
|---|---|
| GUI works, CLI fails | Differences between GUI and CLI execution |
| OutOfMemoryError heap | Heap memory exhaustion troubleshooting |
| CLI Command Builder | Generate clean CLI commands with proper flags |
| Best practices | Official tuning guidelines |
The Backend Listener buffers metrics and attempts to flush remaining data to InfluxDB over HTTP. If the InfluxDB server is slow or unreachable, the listener blocks until timeout. Set summaryOnly=true or lower the client timeout.
Run ./bin/stoptest.sh (or stoptest.bat on Windows) from a separate terminal. This instructs JMeter to gracefully terminate thread groups. If it remains stuck, use ./bin/shutdown.sh.