Response times very slow, cant reproduce locallly
timeattackwtf
PROOP

7 months 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

7 months ago

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


passos
MODERATOR

7 months ago

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


timeattackwtf
PROOP

7 months ago

Dont know but i might be
im using the motor async mongodb client for python and i just use my connection strings


passos
MODERATOR

7 months ago

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


timeattackwtf
PROOP

7 months ago

```python
from motor.motor_asyncio import AsyncIOMotorClient

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


timeattackwtf
PROOP

7 months ago

nah its this


timeattackwtf
PROOP

7 months ago

i cut out some parts


timeattackwtf
PROOP

7 months ago

omfg


timeattackwtf
PROOP

7 months ago

im using


timeattackwtf
PROOP

7 months ago

public network


passos
MODERATOR

7 months ago

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


Loading...