APIs seem slow
raghuwork1
HOBBYOP

a month ago

/actuator/health is taking 757 ms..

Accessed from India and app deployed to south east asia.

$10 Bounty

5 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 1 month ago


raghuwork1
HOBBYOP

a month ago

Thanks bro.. I tried with actuator/health/liveness as well.. 760 ms


raghuwork1
HOBBYOP

a month ago

thanks bro.. instance is always up, its not cold start and the users are consistently reporting the slowness across. Also found that its not just health or liveness api, all APIs are slow.


raghuwork1
HOBBYOP

a month ago

I am not aware this is plan specific "Railway's proxy times out differently on different requests could be a resource issue on your Railway plan too."


17sabbir
FREE

a month ago

Hey, the curl output others suggested is a good start, but you need the full timing breakdown to pinpoint exactly where the 757ms is going:

curl -w "

namelookup: %{time_namelookup}

connect: %{time_connect}

appconnect: %{time_appconnect}

pretransfer: %{time_pretransfer}

starttransfer: %{time_starttransfer}

total: %{time_total}

" -s -o /dev/null https://your-app.railway.app/actuator/health

This tells you if the delay is in DNS → TCP → TLS → or your app itself.

A few things to check based on your situation:

Spring Boot Actuator config — /actuator/health by default aggregates ALL health indicators (DB, disk, Redis, etc). Even if liveness is slow, check if you have custom HealthIndicator beans registered. Disable them temporarily and retest.

application.properties tweak:

management.health.db.enabled=false

management.health.redis.enabled=false

Railway SEA → India latency should only be ~80-100ms. If your curl shows starttransfer is already 700ms+, the bottleneck is inside your Spring Boot app, not the network.

Check your app logs — does every request take 700ms or just the first few after idle? If there's any connection pool warmup happening, that adds latency per-request under low traffic.

Share the curl breakdown and I can help narrow it down further.


raghuwork1
HOBBYOP

a month ago

Its consistently slow..

for i in {1..5}

do

date

curl -w "\nnamelookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n\n" \

-s -o /dev/null \

https://your-app.railway.app/actuator/health

Sun Jun 7 15:30:47 UTC 2026

namelookup: 0.059084

connect: 0.275571

appconnect: 0.496038

starttransfer: 1.178421

total: 1.178646

Sun Jun 7 15:30:48 UTC 2026

namelookup: 0.056006

connect: 0.270383

appconnect: 0.483345

starttransfer: 1.151269

total: 1.151426

Sun Jun 7 15:30:49 UTC 2026

namelookup: 0.053201

connect: 0.268664

appconnect: 0.485660

starttransfer: 0.929339

total: 0.929406

Sun Jun 7 15:30:50 UTC 2026

namelookup: 0.052234

connect: 0.265783

appconnect: 0.481807

starttransfer: 1.138256

total: 1.138410

Sun Jun 7 15:30:51 UTC 2026

namelookup: 0.055369

connect: 0.269659

appconnect: 0.488244

starttransfer: 1.145808

total: 1.146107


Welcome!

Sign in to your Railway account to join the conversation.

Loading...