Stack Matrix Hub (9)
Controlling LiipImagineBundle Thumbnail Filter RAM Bursts
Prevent uncached product image filter generation from spawning 250 MB Imagick/GD memory spikes inside live storefront PHP workers.
80-240 MB/image burst · Async Messenger warm-up · CDN WebP cache
Why First-Visit Category Crawls Trigger Imagick Memory Spikes
When a crawler hits an uncached Sylius taxon page displaying 24 products, LiipImagineBundle processes 24 high-resolution source JPEGs/PNGs through GD or Imagick simultaneously inside web workers, spiking RSS by 120 to 240 MB per active image.
Pre-Warming Filters via CLI & Limiting Imagick Thread Pools
Pre-generate thumbnails with liip:imagine:cache:resolve during product import Messenger jobs, set MAGICK_THREAD_LIMIT=1 in environment variables, and serve resolved WebP assets behind nginx/Caddy static rules or Cloudflare CDN.
Measured Thresholds & Configuration
| Image Pipeline Mode | Peak Worker Spike | Crawl Resilience | Required php memory_limit |
|---|---|---|---|
| On-Demand GD/Imagick (Default) | +180 - 260 MB spike | Poor under bot crawls | 512M risk |
| MAGICK_THREAD_LIMIT=1 + Async Warm | +45 - 80 MB bounded | High stability | 256M safe |
| CDN Image Resizing / S3 Offload | 0 MB on PHP workers | Unlimited crawl scale | 192M - 256M |