R
Railway11mo ago
Nafi

Railway occasionally fails to detect open ports

I've recently created the SurrealDB template for Railway, and upon further experimentation I've found that making changes to the original github repository, or publishing a new docker image, sometimes causes Railway to not handle incoming requests via any networking solution (railway TCP proxy, HTTPS cloudflare proxying). The issue seems to resolve itself after detaching the database volume, and creating a completely new service for the database, then reattaching the volume (but this method is not a guaranteed fix). I'm building an app that will be shipped to production very soon and critical outages like this cannot happen every time there is a SurrealDB update. I've tested everything on my local machine with no issues, so I'm starting to wonder whether it's a server-side latency issue on Railway?
46 Replies
Percy
Percy11mo ago
Project ID: N/A
Nafi
Nafi11mo ago
N/A
Brody
Brody11mo ago
that template is actually a work in progress last I checked oh you're the creator, I didn't realize with the difference pfp photos I had a look at your start.sh script, and environment variables, I don't think there is anything you are doing that can't be done with the official surrealdb image. I'll try my hand at creating a template for it, and if successful I would have no problem handing the template over to you so that you can publish and collect it's kickback
Nafi
Nafi11mo ago
thanks
Brody
Brody11mo ago
@Nafi - here is the completed (but unpublished) template https://railway.app/template/9zvHt- unpublish your current template delete your template fork my template https://railway.app/button?code=9zvHt- publish your fork of my template profit?
Nafi
Nafi11mo ago
looks great man! glad you added --no-banner as well as thinking of adding that to the original Btw @Brody where in the docs did you find the start environment variables?
Brody
Brody11mo ago
the help flag prints them. some things I left as a flag, like enabling auth, don't think too many people want no auth on their database so putting it as a flag kinda hides it away a tiny bit to help prevent accidental changes to auth yeah formatting was very messed up on that, railway trims whitespace from the log lines
Nafi
Nafi11mo ago
@Brody could you send me the markdown you used for the template?
Brody
Brody11mo ago
I mean sure, but why? the markdown is on the template I gave you? I really hope you aren't trying to manually update your template? when I said I'd hand over the template, I really meant it, fork my template and publish it unless you have tried that and the markdown is missing?
Nafi
Nafi11mo ago
I forked it, but all of the published markdown is removed I cant copy raw markdown cause its rendered on your template
Brody
Brody11mo ago
gotcha, use this https://bookmarklets.up.railway.app/template-clone/ I know for a fact this copy's the overview markdown
Nafi
Nafi11mo ago
82056
No description
Nafi
Nafi11mo ago
ill try diff browser
Brody
Brody11mo ago
are you trying to clone to your team account? that's very bugged
Nafi
Nafi11mo ago
thats probably why ill switch still no, tried different browser and hobby workspace ill install something that isnt ungoogle chromium or opera gx 💀
Brody
Brody11mo ago
neither should be a problem, I used that bookmarklet last night to clone your template
Nafi
Nafi11mo ago
got you a train btw
Brody
Brody11mo ago
oh awesome, thank you so much! when you use the bookmarklet, make sure you have swapped to your hobby account, and not selected on the team plan
Nafi
Nafi11mo ago
yeah I did im gonna try on firefox
Brody
Brody11mo ago
I'm away from the computer right now so I can't confirm that my bookmarklet still works
Nafi
Nafi11mo ago
No description
Nafi
Nafi11mo ago
No description
Nafi
Nafi11mo ago
its cool dw maybe u can just copy pasta the markdown once ur home? I can try and just take it from the surreal github its just uve already done it is all
Brody
Brody11mo ago
Nafi
Nafi11mo ago
thanks
Brody
Brody11mo ago
and then you can just copy the image address for the template logo and it's description
Nafi
Nafi11mo ago
yeye thanks brodie really appreciate this
Brody
Brody11mo ago
no problem, templates are my jam
Nafi
Nafi11mo ago
is Brody your real name?
Brody
Brody11mo ago
yes lol
Nafi
Nafi11mo ago
thats so cool dude
Brody
Brody11mo ago
thank you!
Nafi
Nafi11mo ago
Railway
Deploy SurrealDB on Railway
A scalable, distributed, collaborative, document-graph database
Brody
Brody11mo ago
woohoo hopefully when railway starts working on improving the template experience they will add an option for us users to transfer them to each other, right now it's either fork/clone or ask the team to manually transfer
Nafi
Nafi11mo ago
I think the healthcheck was the reason it wasnt detecting open ports yeah that would be awesome
Brody
Brody11mo ago
nope, nothing like that
Nafi
Nafi11mo ago
what do you think?
Brody
Brody11mo ago
not sure, but you had the tcp proxy enabled? it uses http
Nafi
Nafi11mo ago
didnt change anything. I tried both
Brody
Brody11mo ago
did you have a PORT variable when you had it on http mode?
Nafi
Nafi11mo ago
to be fair, the problem only seemed to arise after I added the DB_ prefix to the ENV vars so that may just be it when you suggested that did you just mean credentials? DB_USER and DB_PASS
Brody
Brody11mo ago
not sure what it was, but rest assured you are now the owner of a fully feature complete template when I suggested those variables I had not at all looked into the surrealdb docs, so I did suggest the wrong variables, but that wouldn't have caused issues with ports
Nafi
Nafi11mo ago
yeah fair enough
Brody
Brody11mo ago
yeah, what does the status on the domain say?
Nafi
Nafi11mo ago
it was because I didn't add https that time, it works fine https:// prefix
Brody
Brody11mo ago
ah gotcha @Melissa this thread is a case of doing a manual transfer (with some difficulties), and ive made templates for other users in the past (where they forked my template) a simple native transfer dialog would be awsome!
Want results from more Discord servers?
Add your server