a year ago
Our web app is a FastAPI + React Next.js web app, we deployed it into Railway
(https://railway.com/project/aa35baa2-15a4-4062-9b82-2ddd969cc922),
but the web page response is slow. We are trying to find out why it is so slow.
We used axios in the frontend to manage api calling. And we added interceptor the record the request and response time or every api.
We tested a very simple api, which is get the current login user, it took
GET /api/v1/users/me: 2261.60ms.
based on the axio interceptor.
But We also checked your HTTP Logs, and out in took less than 1000ms.
I was wondering why it took so long in the frontend, is it because the response data transfer? The data was very small, only very simple profile of a singl user. is it because of network issue?
requestId:
"tjjtqZahTcyzSVIggrdzZg_3176973899"
timestamp:
"2025-03-06T09:45:27.129109802Z"
method:
"OPTIONS"
path:
"/api/v1/users/me"
host:
"backend-fastapi-web-production.up.railway.app"
httpStatus:
200
upstreamProto:
"HTTP/1.1"
downstreamProto:
"HTTP/2.0"
responseDetails:
""
totalDuration:
538
upstreamAddress:
"http://[fd12:f94d:27c0:0:2000:40:ba2a:9538]:8000"
clientUa:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
upstreamRqDuration:
379
txBytes:
2
rxBytes:
686
srcIp:
"49.180.45.204"
edgeRegion:
"asia-southeast1"
requestId:
"6R5Td6K2SlqCh9tOxff1UA_3176973899"
timestamp:
"2025-03-06T09:45:27.731024564Z"
method:
"GET"
path:
"/api/v1/users/me"
host:
"backend-fastapi-web-production.up.railway.app"
httpStatus:
200
upstreamProto:
"HTTP/1.1"
downstreamProto:
"HTTP/2.0"
responseDetails:
""
totalDuration:
360
upstreamAddress:
"http://[fd12:f94d:27c0:0:2000:40:ba2a:9538]:8000"
clientUa:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
upstreamRqDuration:
360
txBytes:
212
rxBytes:
963
srcIp:
"49.180.45.204"
edgeRegion:
"asia-southeast1"
1 Replies
Status changed to Awaiting User Response Railway • 11 months ago
Status changed to Solved angelo-railway • 11 months ago