PHP metrics
🐘
How PHP is doing.
The PHP group of the metrics tab shows how fast PHP answers, how many requests it gets, how much memory it uses, how full the OPcache is, and how often a process ran out of memory.
PHP response time
The load balancer times every PHP request. Per sample it keeps three things: how many requests fell into each duration range, the sum of all durations, and the slowest request. Every value of the chart is computed from these:
- max: the slowest single request of the hour or day. It is exact. One stuck request sets it, so it often runs out of the chart.
- avg, med, 99ile: one of the three, picked under "Measure", see average, median and 99ile.
The figures in the box are computed from all requests of the time frame at once, not from the bars. The fastest request is not recorded. The lines mark Fast, Good and Slow. See PHP processes.
The response time shows how long PHP took. The logs name the slow URLs, and an APM tool traces a slow request through the code, down to the query or function.
PHP requests
Requests that run PHP. A sample holds the requests answered since the sample before, a bar is the sum of its samples. Static files are counted separately, under static requests. See PHP processes vs page views.
PHP memory
The memory the PHP containers use. A sample holds the highest memory since the sample before, so it catches short spikes. A bar shows two values:
- max: the highest sample of the hour or day. Compare it with the memory of the plan, drawn as a line.
- typical peak: the median sample. Half of the samples were lower, half higher.
A typical peak far below the max means the memory stayed low most of the time and spiked now and then. See out of memory.
PHP OPcache
How full the OPcache is, the memory that holds compiled PHP code. A sample holds the highest fill level since the sample before, a bar the highest sample of the hour or day. Keep it below the Nearly full line. See keep OPcache below full.
OOM kills
PHP processes the system ended because the environment needed more memory than the plan has. A bar is the number of kills in that hour or day. See out of memory.
Labels and lines
The values each metric shows in one bar, for the time frame, and on the summary page, and the lines drawn across the chart:
| Metric | One bar | Time frame | Summary | Lines |
|---|---|---|---|---|
| Web storage | max, last, min, avg | last, max, min, avg | last | Plan sizes |
| Traffic | sum | sum, max | sum | – |
| Static requests | sum | sum, max, min | sum | – |
| MySQL storage | max, last, min, avg | last, max, min, avg | last | Plan sizes |
| PHP response time | max, avg / med / 99ile | max, avg / med / 99ile | avg | Fast 150 ms, Good 350 ms, Slow 700 ms |
| PHP requests | sum | sum, max, min | sum | – |
| PHP memory | max, typical peak | max, typical peak | max | Plan sizes |
| PHP opcache | max | last, max | last | Nearly full 90% |
| OOM kills | sum | sum | sum | – |
| Jobs memory | max, typical peak | max, typical peak | max | Plan sizes |
| Jobs OOM kills | sum | sum | sum | – |
| 404 errors | sum | sum, max, min | sum | – |
| 500 errors | sum | sum, max, min | sum | – |
| 503 errors | sum | sum, max, min | sum | – |
| 504 errors | sum | sum, max, min | sum | – |