Skip to content
Response times very slow, cant reproduce locallly
timeattackwtf
OP

2 years 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

Closed$10 Bounty

11 Replies

timeattackwtf
OP

2 years ago

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


2 years ago

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


timeattackwtf
OP

2 years ago

Dont know but i might be

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


2 years ago

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


timeattackwtf
OP

2 years ago

from motor.motor_asyncio import AsyncIOMotorClient



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


timeattackwtf
OP

2 years ago

nah its this


timeattackwtf
OP

2 years ago

i cut out some parts


timeattackwtf
OP

2 years ago

omfg


timeattackwtf
OP

2 years ago

im using


timeattackwtf
OP

2 years ago

public network


2 years 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...