7 months ago
Hello!!
I'm experiencing intermittent issues with SSH connections to my deployed services and would like to understand if this is expected behavior or a known issue.
Issue Details:
- Error Message: "Failed to establish connection after 3 attempts: deadline has elapsed"
- Frequency: Intermittent - sometimes SSH works, other times it fails completely
- Service Status: The service is actively running and responding to HTTP requests (curl to /api/health works fine)
- Network Configuration:
- WebSocket connectivity confirmed working (tested with wscat to wss://echo.websocket.org), not behind corporate firewall/VPN, serverless mode is disabled, service has been "awake" when attempting connection
What I've Tried:
- Updated Railway CLI to latest version
- Re-authenticated with railway logout and railway login
- Verified service is responding to HTTP requests before attempting SSH
- Tested WebSocket connectivity independently (working fine)
- Waited 5-10 seconds after making HTTP requests to ensure container is active
- Tried both railway ssh and explicit commands like railway ssh --service --environment
Environment:
- Platform: macOS
- Railway CLI Version: latest
- Service Type: NestJS backend with Dockerfile
- Region: europe-west4
Questions:
- Is intermittent SSH connectivity a known issue within the Railway ecosystem?
- Are there any service-level configurations or requirements I might be missing?
- Is there a way to check SSH service health status on Railway's end?
- Should I expect SSH to work 100% of the time when the service is active, or is some degree of intermittency normal?
- Could this be related to my home network configuration? I've read in some threads that switching to mobile data sometimes resolves SSH connection issues - is this a known network compatibility problem?
The service itself is working perfectly fine for HTTP requests - this issue only affects SSH connectivity, which makes debugging and running administrative tasks challenging
6 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 ssh timeout
- 🧵 Railway CLI logged in but unable to perform some commands
- 🧵 SSH Access Lost in TetraltoDjango After Git-Based Deployment
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
Hello!
We're acknowledging your issue and attaching a ticket to this thread.
We don't have an ETA for it, but, our engineering team will take a look and you will be updated as we update the ticket.
Please reply to this thread if you have any questions!
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
No, I cannot reproduce it consistently, which is part of what makes it confusing.Here's what I've observed:
Connectivity Pattern:
- At my home WiFi: SSH fails most of the time with "deadline has elapsed" error
- At a friend's house: Connected instantly on first attempt
- Same laptop, same Railway CLI version, same service
This inconsistency suggests it might be network-specific rather than a Railway service issue. The fact that it worked immediately at a different location makes me think there might be some network configuration or ISP-level restriction at my home that's interfering with the WebSocket connection Railway SSH uses.
However, I've verified that:
- Basic WebSocket connectivity works (tested with wscat to echo.websocket.org)
- I'm not behind any corporate firewall or VPN
- The service is always responding to HTTP requests
Status changed to Awaiting Railway Response Railway • 7 months ago
7 months ago
This is very likely related to your network instead of Railway's in that case. Unfortunately we cannot help with that :-/
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
❌ The ticket Intermittent Connection Errors has been marked as canceled.
7 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 • 7 months ago
