No Emily, I never read a single byte of it. Went back like a month after I "fixed" it, opened one of the dumps, and it was 40k lines of the same three bookmaker JSONs with timestamps that differed by milliseconds. Deleted the whole folder and felt nothing. Pure hoarding, you called it.
Sarah's right that hour one is generous though. The "profiler says everything is fine" thing is real, I've burned whole evenings staring at a flamegraph convinced the resize was the problem while the actual leak was just sitting there in a module scope collecting dust. Blackfire only tells you what you ask it to compare. If you don't snapshot twice and diff, you're just looking at pretty colors.
On the logging question, since Greg asked and I do this for a living now: stdout only, and let the container runtime deal with it. I run my workers in docker with the json-file driver capped at like 10m and 3 files, so it rotates itself and I literally cannot leak into a file handle I forgot about. If you need in-process buffering for some reason, use something bounded (deque with maxlen, or a ring buffer) so the worst case is "I lost old logs" instead of "I lost the whole worker at 3am." Blanking the list works but it's a chore you'll forget in the next refactor, and sarah already said that better than I did.
greg your scraper dying every night at 3am and you only checking in the morning is genuinely the funniest version of this. The bug was hiding from you on a schedule.