7 months ago
Issue Description
I'm experiencing SSL handshake timeout errors when my Streamlit application deployed on Railway.app attempts to connect to Supabase for authentication. This issue does not occur when running the application locally.
Error Message
ERROR:components.auth:Login failed: _ssl.c:989: The handshake operation timed out
Application Stack
Frontend: Streamlit
Backend/Database: Supabase
Deployment: Railway.app
Steps to Reproduce
Deploy Streamlit app to Railway.app
Attempt to log in through the application
Observe intermittent SSL handshake timeout errors
What I've Tried
Increased timeout settings for the Supabase client
Implemented retry logic for login attempts
Verified all environment variables are correctly set in Railway.app
Ensured Supabase project region is appropriate for minimizing latency
Questions
Are there any known issues with outbound SSL connections from Railway.app to Supabase?
Are there any recommended configurations or best practices for connecting to external databases (specifically Supabase) from a Railway.app deployment?
Could there be any network-level restrictions or configurations on Railway.app that might be causing this issue?
Are there any diagnostic tools or logs available on Railway.app that could help identify the root cause of these SSL handshake timeouts?
Additional Information
The issue occurs with every login attempt & auth call within app and seriously impacts user experience
The application works without issues when run locally
3 Replies
7 months ago
None that I know of.
Connecting to an external database is already not recommended because you are subjecting yourself to egress fees.
Nope, we do not have any restrictions, or even a way to apply restrictions if we wanted to.
Since that error wouldn't be specific to Railway (It's a generic SSL error) the platform does not provide any tools for it.
All in all, this error would unfortunately be out of our hands, this is something you would want to contact supabase for.
Status changed to Awaiting User Response railway[bot] • 7 months ago
7 months ago
It's bizarre - The first app has no problems (personal 1-person auth). This one didn't until about a week ago. I am back on the tools for it, will try a few things today and see how far I get.
for "Connecting to an external database is already not recommended because you are subjecting yourself to egress fees." Does railway provide a DB/Auth service as well? I am a bit green to this and appreciate your help.
Status changed to Awaiting Railway Response railway[bot] • 7 months ago
7 months ago
We provide Postgres itself, and I'm sure there are some auth templates you can use.
Status changed to Awaiting User Response railway[bot] • 7 months ago
Status changed to Solved brody • 7 months ago