The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / tomcat / tomcat-stuck-threads ▌

Operations Guides

Tomcat stuck threads: StuckThreadDetectionValve and 'may be stuck' warnings

The warning shows up in catalina.out: a worker thread “has been active for [N] milliseconds … and may be stuck.” By the time you see it, the thread has already been blocked for the full threshold duration. If the valve is running with its default 600-second threshold, that is 10 minutes of a worker thread doing nothing useful. With maxThreads=200, a handful of these threads eats real capacity.

The StuckThreadDetectionValve is Tomcat’s built-in canary for thread-pool exhaustion. It is not enabled by default. When enabled, it logs a WARN-level message whenever a request-processing thread exceeds a configurable threshold, and it includes the blocking stack trace. That stack trace is the single most useful piece of evidence you will get during a thread-starvation incident, because it tells you exactly where the thread is parked.

What this means

A “may be stuck” warning means a request-processing thread (one of the http-nio-<port>-exec threads) has been executing a single request for longer than the valve’s threshold. The valve wraps the request pipeline and times each thread from the moment it is dispatched until the response is committed. When the elapsed time crosses the threshold, the valve fires the warning with a stack trace of the offending thread.

Two constraints matter when interpreting these warnings.

First, the valve only monitors request-processing threads. Background threads (ContainerBackgroundProcessor, catalina-utility threads, application-spawned schedulers) are invisible to it. A deadlock or hang in a background thread will not trigger this warning. If your symptom is a scheduled job that stopped running or a cluster heartbeat that went silent, the valve will not help.

Second, the warning is a lagging indicator. With the default 600-second threshold, the thread has been stuck for 10 minutes before you hear about it. The valve’s detection runs on the container’s background processor thread, so the effective resolution is bounded by backgroundProcessorDelay (default 10 seconds). If you set the threshold below that interval, detection will lag further. Lower the threshold to 60 to 120 seconds for production use.

The valve’s companion message matters too. When a previously-stuck thread completes, it logs that the thread “was previously reported to be stuck but has completed,” with the total active time and a count of threads still stuck. Watch for threads that are reported stuck and never complete. Those are the ones consuming pool slots permanently.

flowchart TD
    A[Request arrives at connector] --> B[Worker thread dispatched]
    B --> C{Backend responds?}
    C -- No timeout / hangs --> D[Thread blocks on I/O]
    C -- Responds in time --> E[Thread returns to pool]
    D --> F[Elapsed time exceeds valve threshold]
    F --> G[Valve fires WARN with stack trace]
    D --> H[Thread stays occupied]
    H --> I[More requests hit same path]
    I --> J[Pool drains toward maxThreads]
    J --> K[Accept queue fills, connections refused or proxy 503s]

Common causes

CauseWhat it looks likeFirst thing to check
Backend call with no timeoutThread parked in socketRead0 or an HTTP client read; JVM CPU lowStack trace in the warning or a fresh jstack
DeadlockMultiple threads BLOCKED on the same lock; jstack prints a deadlock graphBottom of the jstack output
Infinite loopThread RUNNABLE for the full threshold; CPU high on one coreStack trace shows the looping method
JDBC pool exhaustionThread waiting to borrow a connection from the DataSourcePool MBean: numActive == maxActive (DBCP) or activeConnections == maximumPoolSize (HikariCP)
DNS resolution hangThread inside InetAddress or name service lookupStack trace shows java.net.InetAddress

Quick checks

Run these read-only. None of them modify Tomcat state.

# Check whether the valve is configured at all
grep -ri StuckThreadDetectionValve $CATALINA_BASE/conf/

# Look for active or recent "may be stuck" warnings
grep "may be stuck" $CATALINA_BASE/logs/catalina.out | tail -20

# Take a thread dump immediately (the diagnostic goldmine)
# Run as the same OS user that owns the JVM. In containers, use jcmd or kill -3 <pid>.
# If multiple Tomcat instances run, narrow the pgrep pattern or specify the PID directly.
jstack -l $(pgrep -f 'catalina.startup.Bootstrap' | head -1) > /tmp/tomcat-threads.txt

# Count worker threads by state
grep "http-nio" /tmp/tomcat-threads.txt | grep "java.lang.Thread.State" | sort | uniq -c

# Check thread pool saturation via Manager status (requires the manager webapp deployed)
curl -s -u $USER:$PASS 'http://localhost:8080/manager/status?XML=true' | \
  grep -oP '(currentThreadsBusy|currentThreadCount|maxThreads)="[0-9]+"'

# Check JVM CPU (low CPU + stuck threads = waiting on I/O, not computing)
top -p $(pgrep -f 'catalina.startup.Bootstrap' | head -1) -bn1 | tail -2

# If the valve is configured, read stuckThreadCount via JMX.
# The ObjectName varies by where the valve is deployed (Engine, Host, or Context).
# Adjust host and context accordingly.
java -jar jmxterm.jar -l localhost:9090 -n -v silent -e \
  "get -b Catalina:type=Valve,name=StuckThreadDetectionValve stuckThreadCount"

How to diagnose it

  1. Confirm the valve is active. If grep finds nothing in server.xml or context.xml, the valve is not configured. The warnings you are chasing came from a different source, or you are looking at the wrong host. Add the valve before the next incident so you actually get the data.

  2. Read the stack trace in the warning. The valve logs the stuck thread’s stack trace as part of the WARN record. This is the fastest path to root cause. The top frames tell you what the thread is blocked on: socketRead0 means network I/O, Object.wait or park means waiting on a monitor or connection pool, ThreadPoolExecutor.getTask means waiting for work. Match the frame to the cause table above.

  3. Take a fresh jstack if the warning is stale. The valve captures the stack at the moment the threshold was crossed, which is usually what you want. But if the thread has moved on or the situation is evolving, a fresh dump shows current state. Take two dumps 5 to 10 seconds apart and diff them to confirm the thread is truly parked in the same place.

  4. Check the backend the thread is waiting on. If the stack shows a JDBC call, check the database. If it shows an outbound HTTP client call, check that downstream service. Stuck threads are almost never a Tomcat bug. They are a backend call with no timeout.

  5. Check thread pool utilization. currentThreadsBusy approaching maxThreads confirms the stuck threads are consuming real capacity. If busy is low despite warnings, the stuck threads are clearing on their own, which points to intermittent backend slowness rather than a permanent hang.

  6. Check CPU. Low CPU with threads stuck means I/O-bound waiting, which is the common case. High CPU means an infinite loop or pathological computation. The fix is entirely different.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
stuckThreadCount (JMX)Numeric count of threads currently over the valve thresholdAny value above 0 sustained
currentThreadsBusy / maxThreadsShows whether stuck threads are draining pool capacityRatio above 0.80 sustained
Request throughputThroughput dropping while threads are busy means threads are blocked, not processingSudden drop with no traffic change
JVM CPUDistinguishes I/O-bound waits from CPU-bound loopsLow CPU + stuck threads = backend hang
Connection refusal or proxy 503 rateTomcat stops accepting connections when the accept queue fills; a load balancer in front typically returns 503Spike correlates with pool exhaustion
“may be stuck” log rateDirect evidence of the valve firingBursts indicate a cascade forming

One nuance on stuckThreadCount: the valve exposes this as a JMX attribute on the Valve MBean, and it is pollable, but it is a derived count of threads currently in the valve’s monitored set. The WARN log line remains the primary operational signal because it includes the stack trace. The count tells you how many; the log tells you where and why.

Fixes

Capture evidence before restarting

Do not restart Tomcat as a first response. The stack traces are your evidence, and a restart destroys them. Capture jstack output first, identify the blocking backend, then decide whether a restart is warranted. Wire jstack capture into your restart runbook so this happens automatically.

Backend call with no timeout

This is the most common cause and the one with the cleanest fix. Find the client library in the stack trace and configure an explicit timeout:

  • Apache HttpClient: set setSocketTimeout and setConnectTimeout on the RequestConfig (HttpClient 4.x) or setResponseTimeout / setConnectTimeout (HttpClient 5.x).
  • OkHttp: call readTimeout and connectTimeout on the OkHttpClient.Builder. OkHttp has a 10-second default since 3.x, but verify your builder is not overriding it to 0.
  • JDBC: set query timeout on the Statement, or set a socket timeout in the connection URL (for example socketTimeout=30000 for the MySQL connector).
  • java.net.HttpURLConnection: call setConnectTimeout and setReadTimeout. Both default to 0 (infinite).

The default socket timeout in java.net.HttpURLConnection, Apache HttpClient, and most JDBC drivers is infinite (0). A single hung backend call will consume a thread forever. Every outbound call on the request path needs an explicit timeout that is shorter than your tolerance for user-facing latency.

Deadlock

If jstack prints “Found one Java-level deadlock” at the bottom of the dump, you have a lock-ordering bug in application code. This requires a code fix. The only immediate operational response is a restart, but the deadlock will recur until the code is fixed. Capture the full jstack (the deadlock graph identifies the participating threads and locks) and route it to the application owners.

Infinite loop

A thread stuck in RUNNABLE state with high CPU is in a loop. The stack trace identifies the method. Common culprits are regex without input bounds (ReDoS), unbounded recursion degenerating into a loop, or a busy-wait missing a wakeup condition. This is a code fix. Restarting clears it until the same input triggers it again.

JDBC pool exhaustion

If the stack shows the thread waiting to borrow a connection, the database connection pool is the bottleneck, not the query itself. Check the pool MBean: numActive versus maxActive for DBCP, activeConnections versus maximumPoolSize for HikariCP. If connections are borrowed but sitting idle (a leak), enable leak detection:

  • Apache Commons DBCP / Tomcat JDBC Pool: set removeAbandoned=true and logAbandoned=true to reclaim leaked connections and log the stack trace where each was checked out.
  • HikariCP: set leakDetectionThreshold (in milliseconds) to log a warning when a connection is held longer than expected.

If the pool is genuinely undersized, raise the max, but verify the database server can handle the additional concurrent connections.

interruptThreadThreshold (use with caution)

The valve has a second parameter, interruptThreadThreshold, that calls Thread.interrupt() on a thread stuck longer than this secondary threshold. The default is -1 (disabled). Enabling it sets the thread’s interrupt flag, which works for threads blocked on I/O or locks because they will throw InterruptedException or wake from a wait. It does nothing useful for threads in CPU-bound loops or certain native calls. The official docs warn there is no guarantee the thread will stop. Treat this as a last-resort circuit breaker, not a real fix. It may let a stuck thread release its pool slot without a full restart, but it will not solve the underlying missing timeout or deadlock.

Prevention

  • Enable the valve in every production Tomcat. It is one XML element and it gives you the stack trace you need during incidents. Add it inside the Engine, Host, or Context in server.xml:

    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
    
  • Set the threshold to 60 seconds, not 600. The default 10-minute window is too long for incident response. The valve’s detection runs on the container background processor, which ticks every backgroundProcessorDelay seconds (default 10), so the effective detection resolution is bounded by that interval. 60 seconds leaves comfortable margin.

  • Configure explicit timeouts on every outbound call. This is the single highest-leverage prevention step. No outbound HTTP, JDBC, or other I/O call in a request path should rely on an infinite default timeout.

  • Monitor currentThreadsBusy / maxThreads as your primary saturation signal. Stuck threads are a subset of busy threads. The ratio tells you whether they are consuming meaningful capacity before the pool hits the wall.

  • Capture jstack automatically before any restart. Wire this into your restart runbook and your container preStop hook so evidence is never lost. Without the stack trace, you are guessing at the cause.

If you run embedded Tomcat under Spring Boot, there is no server.tomcat.stuck-thread-detection.* property. Register the valve programmatically via a WebServerFactoryCustomizer<TomcatServletWebServerFactory> bean that calls factory.addEngineValves(new StuckThreadDetectionValve()).

How Netdata helps

  • Correlate stuck-thread log bursts with thread pool utilization. When currentThreadsBusy climbs toward maxThreads at the same time the valve fires, you see the cascade forming on one timeline rather than reconstructing it from separate tools.
  • Distinguish I/O-bound stalls from CPU-bound loops. JVM CPU utilization alongside thread pool saturation tells you immediately whether threads are waiting on a backend (low CPU) or spinning (high CPU), which changes the entire response.
  • Track request throughput against thread pool saturation. Throughput dropping while busy threads rise is the signature of threads blocked rather than processing.
  • Surface connection refusals and proxy 503 spikes alongside GC pause time. Pool exhaustion and a GC pause look different when you can see both signals per second on the same chart.
  • Alert on the currentThreadsBusy / maxThreads ratio with per-second resolution, so you catch pool saturation before the valve’s threshold even fires.