“PHP must be stuck.”
High web-server CPU is often blamed on application code first. That is reasonable, but if Apache2 itself is consuming CPU while PHP execution does not account for the same load, connection processing deserves investigation.
DarkMatter Software · Private Research Record
Controlled reproduction of Apache2 request-processing pressure, broken connections, misleading log visibility, and the uncomfortable gap between “normal HTTP” and abnormal aggregate behavior.
01 · What caught my attention
The investigation began with a mismatch: Apache2 showed substantial processor use, yet the expected volume of ordinary completed HTTP requests was not obvious in the access logs. At the same time, log entries involving closed connections, broken pipes, or SIGPIPE-adjacent behavior suggested that Apache was doing real work on connections that were not completing in the clean, ordinary way administrators usually expect to see.
That mismatch matters. An Apache access log is not a complete ledger of every unit of work Apache performs. It primarily records requests that progress far enough through HTTP handling to be logged as requests. Connection setup, aborted exchanges, early disconnects, failed response writes, timeouts, and other partial transactions can consume CPU and worker resources without producing a neat one-request-one-line relationship in the access log.
02 · Reproduced mechanism
Snuff was used to reproduce the general shape of the event with controlled traffic. The request itself is intentionally unremarkable: a valid HTTP request sent repeatedly through many short-lived connections. No malformed payload is required. The interesting behavior emerges from aggregate connection handling and request churn.
03 · Why it can masquerade as something else
High web-server CPU is often blamed on application code first. That is reasonable, but if Apache2 itself is consuming CPU while PHP execution does not account for the same load, connection processing deserves investigation.
A crawler can produce repetitive traffic, but ordinary bot traffic normally leaves a more straightforward access-log footprint. Large amounts of connection work with relatively sparse completed requests are a different pattern.
Broken pipes and client disconnects happen naturally. What changes their significance is concentration: repeated connection failures appearing alongside sustained Apache CPU load and reduced correspondence with normal request logging.
04 · SIGPIPE and broken-pipe evidence
A SIGPIPE condition occurs when a process attempts to write to a pipe or socket whose receiving side has already gone away. In the Apache context, that can happen when a client, intermediary, or network path closes the connection before Apache finishes writing its response.
By itself, that proves almost nothing about intent. Browsers cancel requests. Mobile clients vanish. Reverse proxies time out. Bots disconnect. Networks fail. But when broken-pipe activity rises at the same time as Apache CPU usage, open connections, timeouts, or worker pressure, it becomes useful evidence that the web server is spending resources on incomplete exchanges.
| Signal | What it can mean | Why it matters in combination |
|---|---|---|
| apache2 CPU | The web server is actively doing work. | High CPU without equivalent application-layer activity suggests the pressure may be in connection/request handling itself. |
| Broken pipe / client closed | The peer vanished before Apache completed output. | A sustained cluster can indicate abnormal connection churn rather than isolated user behavior. |
| Sparse access log | Fewer cleanly logged requests than expected. | Supports the possibility that substantial work is occurring before normal request completion. |
| Growing latency | Workers or CPU are increasingly contested. | Shows the pressure is affecting service quality, not merely producing harmless noise. |
| Busy workers / connection growth | Capacity is being occupied. | Helps distinguish an application bug from connection-driven resource consumption. |
05 · What the controlled test established
On an older 4 GB Ubuntu test system, even a light controlled run produced visible Apache CPU pressure. That does not mean a modern production system would fail at the same request count or worker setting. Hardware, core count, Apache MPM configuration, kernel limits, caching, reverse proxies, and hosting architecture all change the threshold dramatically.
The important comparison is therefore not “ten workers here equals ten thousand requests there.” The meaningful comparison is the operating state: processor saturation, worker occupancy, connection counts, error behavior, response latency, and the ratio between generated transactions and cleanly logged HTTP completions.
Observed shape: high apache2 CPU + repeated short-lived HTTP transactions + broken/aborted connection evidence + fewer normal-looking HTTP log entries than expected = connection/request-processing pressure worth investigating
06 · Why a normal DDoS comparison can mislead
Network-layer floods such as ICMP-based attacks or certain TCP attacks can consume resources below the HTTP layer. Apache may never see those packets as HTTP requests, so an Apache access log would naturally contain little or nothing about them.
An application-layer request flood is different. It reaches Apache and can look perfectly legitimate one request at a time. The difficult cases are those where the server performs substantial connection and request work but many transactions end prematurely. They can leave evidence in error logs, process CPU, socket statistics, or worker state without producing the kind of obvious access-log flood an administrator expects.
07 · Identification versus attribution
The controlled test strengthens one conclusion: externally generated HTTP connection behavior can reproduce the same broad family of symptoms without requiring a PHP defect. That materially changes the investigation because it supplies a plausible external mechanism for otherwise unexplained Apache workload.
It does not, by itself, prove that the historical event was deliberate, identify who generated it, or establish a specific Apache2 CVE. A true vulnerability claim requires a repeatable defect tied to a particular Apache behavior or version, with evidence that the effect exceeds ordinary capacity exhaustion. Until that threshold is met, the defensible description is request-flood / connection-churn denial-of-service behavior affecting Apache2, not a confirmed Apache vulnerability.
08 · Trackable test traffic
Snuff uses a deliberately recognizable User-Agent during controlled testing:
User-Agent: Snuff-The-Magic-Dragon/Async
This is not intended as a security feature. A hostile client could change or omit a User-Agent trivially. Its purpose is experimental correlation. It allows Apache logs, Xerxes observations, proxy logs, timestamps, and Snuff telemetry to be aligned without guessing which requests belong to the test.
When Xerxes is running in observe mode, the marker creates a clean control dataset. The same request pattern can later be replayed through defensive rules and compared against the baseline without training the defense to recognize the Snuff string itself.
09 · Proxy testing
The proxy option is secondary to the Apache investigation. Its value is validating whether filtering, source handling, or network policy behaves differently when the request arrives through a different network path. Tor and I2P may use different local proxy types and ports, so the test client supports configurable proxy routing when needed.
The important defensive question remains the same: does the protection layer recognize the aggregate behavior when the individual HTTP requests look ordinary?
10 · What to look for next time
No single log line proves this mechanism. The strongest evidence comes from temporal correlation across the stack. During a suspicious interval, compare Apache process CPU, load average, busy workers, connection counts, error-log activity, response latency, access-log volume, PHP/PHP-FPM activity, and any reverse-proxy or firewall telemetry.
| If you see... | Then investigate... |
|---|---|
| Apache CPU rises, PHP does not | Connection handling, request parsing, worker contention, TLS, proxy/module overhead. |
| Broken pipes spike | Client aborts, intermediary timeouts, short-lived automated connections, failed response writes. |
| Few access-log hits but high Apache work | Transactions terminating before ordinary completion/logging. |
| Latency climbs before outright failures | Approaching CPU, worker, backlog, or connection capacity. |
| Activity starts and stops abruptly | Automation, scheduled jobs, scanners, or deliberate external traffic rather than organic demand. |
11 · Defensive significance
The central defensive problem is not malformed HTTP. It is classification. One ordinary request is harmless. Ten may be normal. A thousand may be a promotion, a crawler, a monitoring system, or abuse. Distributed sources make IP-only controls less reliable, while signature-only filtering can miss traffic that has no suspicious payload at all.
For Xerxes, the useful direction is behavioral correlation: request frequency, concurrency, repeated resource patterns, connection churn, source history, session depth, error behavior, and deviation from the site's normal baseline. None is decisive alone. Together, they can reveal the shape of pressure before Apache is already pinned.
Private Project Note
Snuff exists as a controlled research instrument for reproducing and understanding a server-side failure pattern. The value of the project is the evidence it produces, not distribution of the mechanism.
The line is intentional: document the behavior, understand how it appears, improve detection, strengthen Xerxes, and keep the load-generation tooling private.