Container Takes Hours To Start or Sometimes Just Doesn't
I'm trying to deploy a docker container to railway and it builds with no errors from the dockerfile, but the deploy produces no logs for hours and the service is unavailable. Sometimes after waiting a few hours it'll eventually start but most of the time it just sits with no logs or info coming out of the deploy. Here's the dockerfile I'm using:
13 Replies
Project ID:
60e7b407-448b-408b-84c2-c8ac25deef63
60e7b407-448b-408b-84c2-c8ac25deef63
Like most of the "deploy" logs for this service are just fully empty. Only when a new deploy doesn't happen for many hours it'll have the start logs from my app show up with a timestamp that's hours after the "deploy" time
please attach the Dockerfile without the needless censoring
sure I didn't think it made a difference
the little details matter
does this dockerfile build an image and run fine locally?
Yep and in ECS and in my K8S cluster
zero logs what so ever for hours?
yep
Solution
how are you logging? are you logging unbuffered to stdout / stderr?
I believe so let me check
This is the entry point code:
I'm not super familiar with the internals of the haskell io monad but I was pretty sure this logs unbuffered to stdout, doing some more research now
i am even less familiar
ok i think you might be right on the stdout log buffering
thanks!
and just to be clear, your service will always stay unavailable, even once the logs do print?
application failed to respond, right? if so, please check out this docs page - https://docs.railway.app/guides/fixing-common-errors