Adarsh Profile picture
23, developer | AI writing assistant: https://t.co/UI8c0KOtJu | Track your brand keywords on all social platforms: https://t.co/oFyw1ukjJI
Feb 9 9 tweets 2 min read
tldr

spent the weekend debugging why our scraping workers kept crashing 😅
turns out processing everything in parallel was eating up memory and causing OOM errors
switched to sequential processing, added some GC triggers, and bumped up memory limits.
back to 95%+ uptime now 🎉 Image 1. how it was working before:
we were scraping 7 platforms (X, reddit, youtube, tiktok, instagram, threads, pinterest) all at once using Promise.all()
worked fine initially. but as we scaled and sessions got bigger, memory started spiking...