3 months ago
I have a few services running and they are all connecting well both internally and externally using a "target port". Each service has its port configured via a specific variable, e.g. CORE_PORT, MCP_PORT. The target port is then set up to look at these.
The problem I have is when I want to add health checks. With no changes, the health check always fails due to "service unavailable". Going from this doc, https://docs.railway.com/guides/healthchecks, it seems like it requires the service to use the port defined by PORT, however this doesn't seem to be set? I changed the MCP_PORT to MCP_PORT="${{PORT}}" but it's left as blank for the health check.
Is there some special way to handle the PORT env var? Does it still exist?
3 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Container SIGTERM after 60-65 seconds despite healthy keepalive and health checks
🧵 Healthy, non-serverless service is being terminated after successful health check
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
So, I inverted it on one service to PORT=${{MCP_PORT}} and this actually worked. However I have another service this failed with. The difference seems to be that the MCP service uses an ipv4 host of 0.0.0.0 and the failing one uses an ipv6 host of :: . Do the health checks work using ipv6?
3 months ago
There's definitely some ipv4/ipv6 shinannigans going on until we rollout our ipv4 overlay this week or next
Definitely want to be binding to ipv6 for now
Status changed to Awaiting User Response Railway • 3 months ago
2 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 2 months ago