I have a Django app hosted on Railway.com along with a PostgreSQL DB and a Redis instance there. I’ve run several Django apps on here in the past without issue, but with this one, I’m having terrible time-to-first-byte and the initial server response time is 2+ seconds for every page. I’ve worked with their support and it doesn’t look like a VM issue. I’ve tried a ton of things, but nothing. The DB is incredibly small (still in testing mode) but I’ve set up a Redis cache anyway. I have static and media hosted on Google Cloud Storage, images are small and webp I’ve optimized queries and indexed tables, deferred JS scripts and preloaded stylesheets, using uvicorn workers, and made sure db and app are both in same region and using internal URLs (to Railway). Their support ensures it’s not a Railway issue.

Share the Post:

Related Posts