Heatmap Bot Update
Things I learned shipping a Discord bot this week:
1. Railway's restart policy can cause rapid reconnects → Discord IP ban.
Set restartPolicyMaxRetries to 3, not 5. The fewer restarts, the less likely you get rate limited.
2. SQLite is fine for a Discord bot.
WAL mode + aiosqlite = zero issues so far. You don't need Postgres until you're at hundreds of servers with heavy concurrent writes.
3. discord.py slash commands take up to 1 hour to propagate globally.
For instant updates during development, sync to a specific guild instead. But remove guild sync before production or you get duplicates.
4. matplotlib heatmaps are slower than expected (~300ms per render).
Added a global render rate limiter to prevent queue buildup under load. Small optimization, big difference when multiple servers run /heatmap simultaneously.

p/runevr
p/producthunt
p/google-cloud-platform
p/aperture-7
p/raycast
p/kuc-kuc
p/kodlo
p/lasso-11
p/ai-context-flow
p/offiai
p/many-displays
p/reso
p/dino-kids
p/dex-by-exmergo
p/supabase
p/jev
p/htmldrag
p/murror
p/nexupira
p/jot-2-0
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.