Stack Matrix Hub (8)
ps_facetedsearch Layered Navigation & InnoDB Pool Sizing
Prevent multi-attribute category filter queries from exhausting MariaDB InnoDB and stalling PHP-FPM workers.
256 MB-8 GB InnoDB · 2k-150k SKUs · O_DIRECT
Why Multi-Select Facets Multiply Database Working Set Size
PrestaShop ps_facetedsearch joins ps_layered_price_index, ps_layered_product_attribute, and stock tables whenever shoppers toggle size, brand, or price sliders. Across 75,000 to 150,000 SKUs with combinations, the active index working set grows to 3-8 GB.
Avoiding Disk Temp Tables on Shared 256 MB Pools
On shared hosting capped at 128-256 MB InnoDB pools, concurrent ps_facetedsearch requests spill temporary sort buffers to disk, holding PHP-FPM workers open for 3-6 seconds until Nginx returns 502 Bad Gateway.
Measured Thresholds & Configuration
| Catalog Scale | Light Facets Pool | Heavy Facets Pool | Buffer Instances |
|---|---|---|---|
| 5,000 SKUs | 384 MB | 512 MB | 1 |
| 25,000 SKUs | 1,408 MB | 1,792 MB | 1-2 |
| 75,000 SKUs | 3,584 MB | 4,608 MB | 3-4 |
| 145,000 SKUs | 6,656 MB | 8,192 MB | 6-8 |