Slow outgoing HTTP Requests
Hi,
I am experienced issues with really slow outgoing HTTP requests. If I run my application locally everything works well and is fast. But the app on railway really struggles and I've had to increase the HTTP request timeout to 10 seconds.
Sometimes things go through fast, but very often I get timeouts.
23 Replies
Project ID:
b39ed185-6129-4d76-8858-d45b041e6d37
b39ed185-6129-4d76-8858-d45b041e6d37
The service that makes http requests is chr-listener
are we talking about uploading data from local to your app running on railway?
Nop, the service itself is struggling with egress http calls.
Calling rest endpoints of external services outside railway.
what language?
It's a nodejs application, axios.
thats very odd, ive never had any issues with making api calls to external services, maybe this is a bug with axios?
might wanna try switching to the fetch api that comes std with node 18
Yea I mean I thought it was weird as well. But everything runs so smooth locally, I only see the issue on railway.
might also be an issue with the base ubuntu images nixpacks uses, you can also try to use an alpine based node 18 dockerfile
I could try fetch, I have a
.nvmrc
with 18.14.0 so I guess it should be quite straight forward.dont think that would get railway to build with node 18
I had some issues producing a docker image with my pnpm workspace turborepo.
cool, I will try that then and check if that resolves the issue. Next step after that would be to try to docker again I suppose
just asked the team if there is any type of bandwidth management for traffic away from the app, will report back
Thanks!
Yea this service sends quite a few http calls, so would be good to know
got my answer, theres nothing in that layer, no bandwidth management, proxy, etc. nothing
okey, good to know thanks. I'll experiment a bit more with my side. I'll open a fresh ticket if I still struggle after trying both things.
good luck! but you can keep this ticket π
Hey @Brody, I tried first new node fetch with node18 and it was the same issue.
I now converted it to a Docker service with node:18-alpine, but still the same issue.
I am not sure what to test next, probably I have to try to run the container in a separate cloud service, if its the same there then we at least know its not something related to railway.
yeah go try fly with your dockerfile
if there's no issues then you got your new host
Well good and bad news. Same issue in Heroku with same Dockerfile. So it should be something in the application. π
At least I know where to continue dig now.
yay it's not railway