EvergreenAI & Automation4 min readUpdated 2026-11
Running Playwright + LLM Pipelines Under 512MB RAM
Notes from building the AI Timesheet Automation System: keeping Chromium memory bounded, ingesting Google Sheets cleanly, and pairing AI extraction with deterministic fallbacks.
Why constrained servers expose leaky automation
Headless Chromium easily spikes past 512MB if browser contexts linger, parallel tabs stay open, or cold-start workers overlap with cron schedules.
When building the AI Timesheet Automation System, keeping deployments reliable on low-memory containers mattered more than adding complex orchestration.
- Close browser contexts strictly in finally blocks after each scheduled run.
- Block non-essential image, font, and analytics requests during Playwright portal submission.
- Queue runs sequentially with credit-based usage checks before launching headless Chromium.
Hybrid ingestion: LLM + deterministic fallback
Rows pulled from Google Sheets can be semi-structured or messy. Using an LLM handles natural-language descriptions, while a deterministic rule-based parser backs up standard column layouts so predictable runs complete faster and cheaper.
Ingestion (Google Sheets) -> Rule/LLM Extraction -> Validation -> Playwright Runner