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 / php-fpm / php-fpm-memory-leak ▌

Operations Guides

PHP-FPM memory leak: per-worker RSS climbing until the box runs out

PHP-FPM workers are slowly bloating. RSS climbs hour by hour, the box runs out of RAM, the OOM killer shoots workers (or the master), and a restart makes everything look fine again. Hours or days later, the cycle repeats.

This is the slow-burn memory leak pattern, and it is almost always enabled by a single configuration value: pm.max_requests = 0. With worker recycling disabled, every byte a worker fails to release accumulates indefinitely. The leak itself may live in your application code, in a C extension, or in the PHP runtime. The diagnosis is not the same as the fix.

The signature is monotonic per-worker RSS growth with no plateau. Older workers carry more RSS than freshly forked ones. A restart resets the baseline and the curve starts over. Traffic-driven exhaustion looks different: workers come and go, RSS is roughly uniform across the pool, and the listen queue rather than RAM is the binding constraint.

What this means

PHP’s memory_limit constrains a single request’s heap. It does not bound what a worker accumulates across thousands of requests, and it does not see memory allocated by C extensions (ImageMagick, libxml, database client libraries, redis). A worker can report a flat memory_get_usage() while its RSS climbs to hundreds of megabytes. The only thing that reliably resets a worker’s footprint is process recycling, and the only built-in knob that controls that in FPM is pm.max_requests.

When pm.max_requests is 0 (the upstream default), workers live forever. Each request leaks a little, or accumulates a little into a static cache, or hands a reference to a long-lived structure. The growth is monotonic because nothing reclaims it. Eventually total worker footprint approaches system or cgroup RAM. Performance stays acceptable until swapping starts, then latency spikes non-linearly, then the OOM killer fires. The transition from “fine” to “catastrophic” happens in the last few percent of RAM.

flowchart TD
  A["pm.max_requests = 0
workers never recycle"] --> B["Each request leaks
or accumulates a little"] B --> C["Per-worker RSS climbs
monotonically, no plateau"] C --> D["Older workers > newer workers"] D --> E["Total FPM RAM approaches limit"] E --> F["Swap, then OOM killer"] F --> G["Workers or master killed"] G --> H["Restart resets RSS"] H --> B

Restarting PHP-FPM is not a fix. It is a reset that buys time until the next OOM.

Common causes

CauseWhat it looks likeFirst thing to check
pm.max_requests = 0RSS grows without bound across all workers; restart fixes it temporarilyPool config; the upstream default is 0
Application cache in static or global stateRSS grows uniformly across workers handling the same code pathsSingletons, static arrays, in-process caches that never evict
C extension leakmemory_get_usage() stays flat while RSS climbsImagick, libxml, PDO client buffers, redis extension
Circular references or duplicate listenersSlow growth, GC cycles do not reclaim itEvent listeners registered per request, SplPriorityQueue patterns
Known PHP runtime bugUniform growth across all workers, reproduces independent of app codePHP patch version against known fixed leaks

Quick checks

These are read-only. None of them change state.

# Average and max worker RSS in KB (master excluded)
ps -eo pid,rss,cmd | grep '[p]hp-fpm' | grep -v master | \
  awk '{sum+=$2; n++; if($2>max) max=$2} END {printf "workers=%d avg=%.0fMB max=%.0fMB\n", n, sum/n/1024, max/1024}'

# Accurate per-worker memory using PSS (accounts for shared opcache pages)
smem -P php-fpm -c 'pid pss rss' -s pss

# Effective pm.max_requests and process manager mode
php-fpm -tt 2>&1 | grep -E "pm =|pm.max_requests"

# PHP version (compare against known leak fixes)
php-fpm -v

# Per-worker request count and age (correlate RSS against requests served)
curl -s 'http://127.0.0.1/fpm-status?full' | grep -E "pid|requests served|start since|state"

# Recent OOM kills targeting php-fpm
dmesg -T | grep -i "out of memory\|oom.*php\|killed process" | tail -20

# Worker exits by signal (signal 9 = OOM kill, 11 = segfault, 7 = SIGBUS)
grep -c "exited on signal" /var/log/php-fpm/error.log

The two signals that confirm the pattern: RSS scales with requests served (older workers with more requests carry more RSS), and pm.max_requests is 0 or unset. If RSS is uniformly high regardless of request count, you have a large baseline footprint, not necessarily a leak.

How to diagnose it

  1. Confirm the leak is per-worker, not aggregate. Poll per-worker RSS a few times over an hour. A leak shows monotonic growth in individual PIDs. Aggregate growth with stable per-worker RSS means you are spawning more workers (a capacity issue), not leaking.

  2. Check the enabling condition. Run php-fpm -tt 2>&1 | grep pm.max_requests. If it is 0, that is the lever. If it is already set and you still leak, either the value is too high for the leak rate, or you have a fast leak in an extension.

  3. Join RSS to requests served. For each worker PID, compare RSS (from ps) against requests served (from fpm-status?full). A clean linear relationship between requests served and RSS is a per-request leak. A step function tied to a specific endpoint is a code-path-specific leak.

  4. Distinguish PHP-heap from C-level leaks. If memory_get_usage(true) stays flat while RSS climbs, the leak is in a C extension or the runtime allocator, invisible to PHP’s memory accounting. This is common with image processing, XML parsing, and persistent database connections. PHP-level leaks show up in memory_get_usage().

  5. Rule out a known runtime bug. Several PHP patch versions shipped memory leaks that were fixed in later minors. If every worker leaks uniformly regardless of traffic mix, check your PHP version against the known fixes below before chasing application code.

  6. Profile when narrowing down. Once containment is in place, use last request memory from fpm-status?full per endpoint, and application-level profiling, to identify which request type drives the growth.

Known PHP runtime leaks

Several PHP runtime memory leaks present exactly like this pattern: uniform RSS growth across all workers, independent of application code. Patching is the only real fix. pm.max_requests is containment.

  • PHP 8.1 before 8.1.18: opcache-less FPM leak via zend_map_ptr not being reset between requests, causing unbounded growth of interned class name strings. Tracked as GH-8646.
  • PHP 8.2 before 8.2.23: opcache shared memory placement leak (GH-13775). The opcache SHM mapping was allocated too close to the heap. Notably, this leak did not reproduce under Valgrind or massif, which made it hard to diagnose from profiles. Fixed in 8.2.23.
  • PHP 8.3 before 8.3.7: memory leak on stream filter failure (GH-13264).
  • PHP 8.3 before 8.3.20: memory leak when destroying PDORow.

If you are on an older patch release, upgrade before spending days in application profiling. A one-line pm.max_requests = 500 buys you the time to do the upgrade safely.

A per-child RSS-based recycling directive (pm.max_memory) has been proposed (GH-17661) but is not merged as of mid-2026. Until it exists, pm.max_requests is the only built-in recycling knob.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Per-worker RSSThe direct leak indicatorMonotonic growth with no plateau between restarts
Per-worker requests servedLets you normalize RSS by work doneRSS scales with requests served means a per-request leak
pm.max_requests configThe enabling condition for unbounded growthSet to 0, or set high enough that a slow leak fills RAM before recycle
System or cgroup available memoryThe macro view of what worker RSS aggregates toDeclining trend over hours or days with flat traffic
Swap usagePHP’s access patterns are catastrophic under swapAny sustained swap-in on a PHP host
OOM kills in dmesgConfirms the leak has hit the wallOut of memory: Killed process entries naming php-fpm
Worker exit signalsDistinguishes recycling from OOM or segfaultsignal 9 (SIGKILL) means OOM; periodic code 0 means normal recycling
memory_get_usage(true) vs RSSSeparates PHP-heap from C-level leaksFlat PHP heap, climbing RSS means an extension leak

Fixes

Immediate containment: enable worker recycling

Set pm.max_requests to a finite value in the pool config. A useful starting band is 500 to 1000 for most applications. A worker that has served its limit finishes the current request, delivers the response, then exits and the master forks a replacement. There is no mid-request interruption.

; /etc/php/8.x/fpm/pool.d/www.conf
pm.max_requests = 500

Reload the service to apply. Under systemd, systemctl reload php8.x-fpm sends SIGUSR2 to the master, which gracefully reloads pool configuration. Workers in flight finish their current request.

The tradeoff: lower values recycle more often, costing fork overhead and per-process warmup (cold application-level caches, fresh connection pools) for the replacement worker’s first requests. Higher values let a slow leak fill more RAM before recycling. If RSS climbs back to dangerous levels within the request budget, lower the value.

Do not set it absurdly low (for example 50). The fork and warmup cost per request starts to dominate. Do not set it absurdly high (for example 10000) if you have a real leak; you are just lengthening the fuse.

Verify recycling is actually happening

After applying, confirm workers are cycling. Poll fpm-status?full and watch requests served per worker. Values should cluster below pm.max_requests and reset as workers are replaced. If you see workers with requests served far exceeding the limit, recycling is broken or the reload did not take.

Also watch worker exit logs. Periodic clean exits at a rate consistent with your traffic and pm.max_requests are healthy. A sudden absence of exits after a config change means the new value did not load.

Narrow down the leak source

Containment is not a fix. Once the box is stable, find the leak.

  • If RSS scales with requests served uniformly, suspect a per-request leak. Compare last request memory per endpoint from fpm-status?full. Endpoints with disproportionate last request memory are your first suspects.
  • If memory_get_usage(true) is flat but RSS climbs, the leak is C-level. Common culprits: persistent PDO connections, MySQL client buffers, libcurl handles, Imagick objects, the redis extension. These are invisible to PHP’s memory accounting and unaffected by memory_limit.
  • If growth is concentrated in a subset of workers, the leak is triggered by specific code paths. Cross-reference high-RSS workers’ recent script field from full status against application endpoints.
  • If growth is uniform across all workers regardless of traffic mix, suspect a runtime bug. Check PHP version against the known fixes before chasing application code.
  • Avoid gc_collect_cycles() in a hot loop. The cycle collector is O(n) in cycle roots. Calling it every request on a busy worker can cost more CPU than it saves. Call it every N requests if needed, not unconditionally.

Consider ondemand as a containment layer

pm = ondemand kills idle workers after pm.process_idle_timeout (default 10s). This caps how long any single worker can accumulate memory, because idle workers do not persist. It does not fix the leak. It limits the number of long-lived workers. Useful on hosts with bursty traffic where workers frequently go idle. Less useful on constantly busy pools where workers never idle out.

Prevention

  • Set pm.max_requests on every production pool. Treat 0 as a misconfiguration, not a default. 500 to 1000 is near-zero cost (a fork every few hundred requests) and removes the entire class of slow OOM incidents.
  • Monitor per-worker RSS as a trend, not a snapshot. The leak is only visible over hours. Poll frequently enough to see the slope.
  • Normalize RSS by requests served. The leak rate is RSS growth per request, not RSS alone. A worker that grew 50MB over 500 requests is leaking roughly 100KB per request.
  • Use PSS, not RSS, for capacity math. Naive workers * RSS overestimates footprint by 30 to 50% because forked workers share read-only pages including the opcache segment. smem or /proc/<pid>/smaps_rollup Pss gives accurate per-worker memory.
  • Keep PHP patched. Runtime leaks get fixed in patch releases. Staying current removes whole classes of leak without any application work.
  • Set request_terminate_timeout as well. A stuck worker holding a slot forever is a different failure, but it compounds a memory leak by reducing the effective worker count. 30 to 60 seconds is a reasonable starting point.
  • Size pm.max_children by memory, not CPU. Formula: max_children = (total_RAM * 0.7 - OS_overhead) / avg_worker_RSS. Blindly raising max_children on a leaking pool accelerates the OOM.

How Netdata helps

  • Per-second per-worker RSS trends make the slow-burn slope visible long before the box swaps. Snapshots miss it; a per-second series catches the monotonic growth pattern that defines this incident class.
  • Correlating RSS against requests served per worker turns a raw memory chart into a leak-rate signal. A flat RSS-per-request line means no leak; a rising line means per-request accumulation. This is the fastest way to confirm the pattern without manual polling.
  • Cgroup and host memory metrics alongside FPM metrics let you see total footprint approach the limit, swap onset, and OOM kills in one view, rather than stitching dmesg, free, and ps after the fact.
  • Worker exit signal tracking distinguishes normal pm.max_requests recycling (clean exit, periodic) from OOM kills (signal 9) and segfaults (signal 11), so you know whether the box is healing itself or bleeding.
  • Anomaly detection on RSS and request duration surfaces the leak before it crosses a hard threshold. This matters because the transition from fine to catastrophic happens in the last few percent of RAM, and threshold-based alerts fire too late to prevent the OOM.