Posts

Showing posts from November, 2026

OpenLiteSpeed vs Nginx PHP Isolation

Image
Scrolling system log output during a load stress test (Photo via Unsplash) Single-site benchmarks lie. Point wrk at a fresh WordPress install on almost any modern stack and you'll pull 18,000 requests per second out of a $20 VPS. That tells you nothing about running a multi-tenant CMS host. Put 75 WordPress, WooCommerce, and Drupal tenants onto one 16-core, 64 GB Debian box and the failure modes change overnight. Tenant #37 installs a sloppy inventory sync plugin that parks 12 PHP workers on dead upstream sockets. Tenant #14 updates a category archive and kicks off a cache stampede across 400 pages. Suddenly synthetic RPS stops mattering. What matters is blast radius, memory ceilings, cache invalidation accuracy, and how fast you can catch the offender at 3:00 AM. Over the last few years I've operated production multi-tenant fleets on both OpenLiteSpeed with LSPHP (via LSAPI) and classic Nginx with PHP-FPM, regularly sanity-checking our numbers against the CMS infrastruct...

Systemd Socket Tuning for High Load

Image
Security telemetry graphs displayed on a dark workstation (Photo via Unsplash) If you've run busy Linux web stacks for a few years, you recognize this outage immediately. Traffic jumps for twenty seconds after an email blast, a webhook storm, or a cache stampede. CPU sits at 35%. Memory has gigabytes free. Application logs look calm. Yet Nginx spits out waves of 502 Bad Gateway errors, and your error log fills with Resource temporarily unavailable or abrupt upstream timeouts. Almost nobody checks the kernel listen queue first. People blame PHP, Go, Python, the firewall, or noisy hypervisor neighbors. What actually happened is far more mundane: your worker pool saturated for 200 milliseconds, incoming connections stacked up in the accept queue, and Linux quietly truncated that queue at 128 or 511 slots. On hosts where systemd manages service lifecycles and socket activation, mismatched sysctl defaults, unit files, and daemon configs keep that cap invisible until burst load h...

Redis Object Cache Memory Eviction

Image
Printed circuit board pathways under studio lighting (Photo via Unsplash) At 14:22 on a Tuesday afternoon, our main editorial CMS slowed to a crawl. Median time to first byte jumped from 94 milliseconds to 4.1 seconds across four PHP-FPM application nodes. MariaDB primary CPU pinned itself at 89%, active threads climbed past 140, and editors couldn't save a draft without hitting a gateway timeout. Meanwhile, our dedicated Redis 7.2 node on Debian 12 sat practically idle at 5% CPU and 18 Mbps of traffic. That mismatch sends most teams down the wrong path. Slack immediately blamed a morning plugin release or exhausted PHP-FPM workers. We ruled out kernel backlog drops fast—we'd already raised listen queue ceilings during our earlier systemd socket tuning for high load work. PHP process pools weren't starving either; per-pool memory boundaries had held steady since our OpenLiteSpeed vs Nginx PHP isolation audit. PHP wasn't waiting on sockets. It was hammering MariaDB ...

Dynamic vs Static PHP FPM Pool Modes

Image
Network switching hardware with glowing amber link LEDs (Photo via Unsplash) Every Debian and Ubuntu PHP package ships with the same conservative www.conf defaults: pm = dynamic , five max children, two start servers, one minimum spare, three maximum spares. Most engineers raise pm.max_children before launch. Far fewer touch the process manager mode. The config comments make dynamic sound smart—scale workers up under load, reap them during lulls, save RAM. On a shared host juggling thirty quiet domains, that logic holds up. On a dedicated 8-core server taking real bursts, pm = dynamic is a latency trap. I've watched this play out on production WooCommerce stores, Laravel APIs, and media sites for over a decade. The box cruises at 12% CPU all morning. Then a newsletter hits 200,000 inboxes or a scraper opens 300 connections at once. Within two seconds, kernel CPU crosses 35%, Nginx logs upstream socket failures, and p99 latency blows past three seconds. You didn't run o...