{"canonical_url":"https://engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/","content_markdown":"# A bounded event pipeline for a macOS app\n\nBounded event buffers and logging after a recorded macOS incident with 41 MB per second growth and 111 GB of compressed pages on a 36 GB machine; a recorded full test run reduced core log lines from 610,996 to 1,411.\n\nSeptember 2026\n\n**Situation.** On 2026‑09‑01, diagnostic reports recorded 111 GB of compressed pages for the macOS app on a 36 GB machine. A separate footprint sample recorded growth of about 41 MB per second while a connection retry loop emitted core events.\n\n**Task.** The event path needed explicit memory bounds. A burst of core log events was retained in an unbounded main stream and copied to seven subscriber streams whose consumers did not use those log events.\n\n**Action.** Buffers were bounded, subscriptions filtered by event type and logging given a rate budget. Overflow handling makes the trade explicit: repetitive diagnostic events may be dropped, and affected state can be refreshed rather than retaining unlimited events. Architecture checks and application‑budget tests defend the bounded design.\n\n**Result.** The incident record documents a full test‑run comparison: core log lines fell from 610,996 to 1,411, and captured log size from 63 MB to 388 KB. These are recorded test‑run measurements, not a production traffic benchmark or a measured post‑fix memory figure. The logging change alone did not fix separate shutdown timeouts; those required their own correction.\n\n---\n\n- Role: macOS Application Engineer\n- Categories: [Solution Architecture](https://platform.engineer.company/categories/solution-architecture/), [Frontend Engineering](https://platform.engineer.company/categories/frontend/), [Reliability \u0026 Backups](https://platform.engineer.company/categories/reliability/), [Monitoring \u0026 Observability](https://platform.engineer.company/categories/observability/), [Performance Tuning](https://platform.engineer.company/categories/performance/), [Testing \u0026 QA](https://platform.engineer.company/categories/testing/)\n- Services: [Platform \u0026 Solution Architecture](https://platform.engineer.company/services/platform-architecture/), [Frontend Development](https://platform.engineer.company/services/frontend-development/), [Site Reliability \u0026 Monitoring](https://platform.engineer.company/services/site-reliability/)\n\n\u003chttps://engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/\u003e\n","date_modified":"2026-11-12T05:34:23Z","description":"The incident record documents a full test-run comparison: core log lines fell from 610,996 to 1,411, and captured log size from 63 MB to 388 KB.","formats":{"gemtext":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/index.gmi","gopher":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/gophermap","html":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/","json":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/index.json","markdown":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/index.md","pdf":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/index.pdf"},"kind":"page","language":"en","title":"Bounded buffers after 41 MB/s memory growth","url":"https://platform.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/","version":1}