Skip to main content
Backend Developer2010
#Python#Icecast#Flask#Linux

mixRadio — Internet Radio

Internet radio in Python (2010) that ran 8 years without a reboot after fixing a memory leak. Pre‑streaming era, when MP3 still smelled like adventure.

2010. Before the Mainstream

“Internet radio” sounds routine now. In 2010 — it was bravado. Icecast, playlists, narrow pipes, office listeners — pure startup vibes.

I built my own station and a similar system for vrespecte. Streaming, web panel, stats — with a main enemy: memory that leaked like sand through a sieve.

Business Insights

  • Uptime = trust and lower ops cost: fewer crashes → fewer pager duties.
  • The cheapest optimization is leak elimination.
  • Reuse (radio as monetization in vrespecte) increases returns on R&D.

The Problem

After 6–8 hours the server died. RAM ballooned, OOM killer did its job. The hunch — “something isn’t freed.” In reality — classic leak from unclosed resources.

The Fix (honestly short)

  • Reproduced and measured memory growth.
  • Found unclosed file descriptors at the hotspots.
  • Switched to explicit resource management (context managers) and tightened caches.

The result was both funny and beautiful: after the fix, the system ran for years. Literally. Last time I checked the uptime was near eight years.

До
После
Stable runtime
6–8 hours
8 years without reboot
33%
RAM
up to 1 GB → OOM
steady ~55 MB
5400%

What It Taught Me

  • Respect explicit resource management (“explicit is better than implicit”).
  • Keep caches on a leash.
  • Python services can be “like a tank” if you sweat the details.

mixRadio is that rare case of “one‑line fix saved the project.” Sometimes magic is in the details.