8 months ago
So I just moved my no code website builder from a vps to railway but I have a huge problem that I didn't have before, my wildcard subdomains are unbelievable slow it takes 5/10 seconds to load but my user custom domains which is routed to the same domain is instant. I've tried following the docs, redeploying countless times, delete the service and install again, tried playing with everything on the cloudflare side but nothing it's just slow.
In Cloudflare both my acme and wildcard dns records are not proxied I have disabled cloudflare universal ssl I have set ssl/tls encryption to full strict
12 Replies
8 months ago
Hello, Unfortunately I was not able to reproduce this, That means the issue would lye with your application, I would suggest adding verbose logging so that you can pinpoint where the slowness is coming from within your application code.
8 months ago
It's not my code, I've tried with fly.io a vps used with cleavr.io and vercel all work properly but yours, maybe I'm reading the docs wrong or the docs aren't as explicit as they should be. Would really love to your application as it allows me to not worry about scaling but this is a huge issue for my start-up
-whenever I try to acess the wildcard subdomain in railway I just don't get the host and then I get a sentry error saying there's a slow query because it's fetching something that doesn't exist as the host is empty for my subdomains but for my custom domains it fetches correctly without any issue
8 months ago
Thank you for the extra information, I will attempt to test to see if my application is being passed the Host value when a request is made from a wildcard subdomain.
8 months ago
Is there a way that i can send an email with more info because its not letting me paste my sentry logs and my code
8 months ago
Heres the slow DB(annexed file) query that happens with sentry only on railway the host is supposed to be lanndi as I'm on lanndi.lanndi.site wildcard subdomain.
also annexed my code and some other info that should be relevant
Attachments
8 months ago
I see you are grabbing the host from the headers via headers().get('host')
but the hostname is not a header, it is part of the actual http request itself.
Perhaps that's your issue?
8 months ago
Please see this example, it may help spread some light on how hostnames work - https://wildcard.railyard.link/raw
For context the domain in my service is *.railyard.link
8 months ago
Ok Perfect, I will test that way maybe other services do it differently than railway, one other thing I was also experiencing some slowness when I used railway for my dashboard I'm guessing this is because I'm in Europe and you only allow us region for hobby plan, would it possible to get a free trial to test out if the pro plan solves this issue as I dot want to commit to than plan before testing everything and making sure I can properly use the wildcards and have no slow responses?
8 months ago
I'm sorry but we can not offer a trial of the Pro plan, mostly because we have no way to provision an account on the user's behalf.
But you can upgrade to Pro and if it doesn't suit your needs we would have absolutely no issues giving you a full refund.
8 months ago
Idk why but after I bought pro and setup everything again it just started working, but there's a wierd thing with my laravel app it says my envs are not set(in the logs) even tho they are and I can freely access the app amyne something to look into, also idk why I can't use either shared variables or reference a variable from another service right now everything is working but it's an awesome feature I would like to have acess to
8 months ago
It's likely you just need a refresher on how they work, please read our docs on this topic - https://docs.railway.app/guides/variables#reference-variables