📢 **PSA: Our Server Has Been Drinking Memory Smoothies Again** #502
accius
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone 👋
So here's the thing — every time we merge a PR lately, we've been accidentally introducing memory leaks. Sometimes it's the same ones coming back like a bad ex, sometimes they're brand new and ✨creative✨. Either way, the result is the same: the hosted site eventually goes down, and 9,000+ daily users start frantically refreshing wondering where their HamClock went.
I've been watching the memory graphs like a hawk, but some of these leaks are sneaky. Like "everything looks fine for 6 hours and then suddenly we're at 400MB and climbing" sneaky.
So — friendly reminder to all contributors:
🧠 Think about caches. If you're adding a
new Map()ornew Set(), ask yourself: what cleans this up? Does it have a cap? A TTL? Or does it just grow forever like my Steam backlog?📡 Think about scale. We're running 2,000+ concurrent users at any given moment. That API call that fires once per user per minute? That's 2,000 calls per minute. That cache entry per callsign? There are a lot of callsigns. Multiply everything by 2K and see if it still feels reasonable.
🗑️ If it goes in, it needs to come out. Every
.set()needs a.delete()somewhere. Every array that gets.push()ed needs something trimming it. Nature finds a way... memory does not free itself.None of this is a callout — y'all have been shipping amazing features and I'm genuinely grateful. Just want us all keeping memory hygiene in mind so the site stays up and nobody has to see me panic-restarting Railway at 2 AM. 😅
73 de K0CJH 🍻
Beta Was this translation helpful? Give feedback.
All reactions