3 months ago
A simple health check view
@api.get("/health")
async def health():
"""Health check endpoint."""
return {"status": "healthy", "timestamp": time.time()}
is giving a latency of 300 ms to 500 ms.
I am on a hobby plan . How do I fix this?
7 Replies
3 months ago
Are you using FastAPI?
3 months ago
Also any chance you have some middleware running on that endpoint?
No, I am using django-bolt https://github.com/FarhanAliRaza/django-bolt . It is using basic middleware like cors and compression.
On localhost, the average latency is under 5 ms.
3 months ago
use this command to diag the issue and send the output to any chatbot and get details.
curl -w "namelookup:%{time_namelookup} connect:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" -o /dev/null -s https://gallant-adaptation-production-f6d4.up.railway.app/healththere is a thread on my side about this issue.
3 months ago
consider the roundtrip of a request on global network is different with your localhost.
3 months ago
Dear Alireza,
Change the region and its helpful.
https://station.railway.com/questions/metrics-are-wierd-687c0f49