Response times very slow, cant reproduce locallly
timeattackwtf
PROOP

a year ago

I currently run my fastapi server on railway metal us west california

32gb ram 32 vcpu. however resposne times are very slow, does anyone know how I can fix this? these are simple queries to my database that are hosted on the same project same servers, and the database is mongodb with like maybe 1mb max each database

$10 Bounty

11 Replies

timeattackwtf
PROOP

a year ago

92ab46c6-a288-4a2c-a741-2ad57a0f4ea6


a year ago

Hey, are you using private networking to connect to your mongodb database?


timeattackwtf
PROOP

a year ago

Dont know but i might be

im using the motor async mongodb client for python and i just use my connection strings


a year ago

in your environment variable for your database, can you check if it contains railway.internal?


timeattackwtf
PROOP

a year ago

from motor.motor_asyncio import AsyncIOMotorClient



def get_mongo_client():
    client_uri = "mongodb://@junction.proxy.rlwy.net:33514"
    return AsyncIOMotorClient(client_uri)```


timeattackwtf
PROOP

a year ago

nah its this


timeattackwtf
PROOP

a year ago

i cut out some parts


timeattackwtf
PROOP

a year ago

omfg


timeattackwtf
PROOP

a year ago

im using


timeattackwtf
PROOP

a year ago

public network


a year ago

You're not using private networking, I recommend you removing that hardcoded URL and instead adding a environment variable


Welcome!

Sign in to your Railway account to join the conversation.

Loading...