PHP Gateway Timeout
I'm getting a Gateway Timeout on my PHP app hosted on Railway. Any ideas on how to fix?
53 Replies
Project ID:
6075b048-d8ff-4bce-ba3b-4342e6664862
6075b048-d8ff-4bce-ba3b-4342e6664862
I'm not sure why deployments are being removed
Also getting these
I haven't updated this project in awhile
deployments are removed whenever a new deployment is made
what would you like your request timeout set to?
idk why my request would take that long
oh so the request shouldn't ever take a minute?
no, there isn't that much dat
data
are you calling some external service that isn't responding?
no it's calling the api
yeah that's what I mean
campo-radio-production.railway.app/index.html
pw is RadioClub23!
nothing sensitive on the site
are you calling some external api that isn't responding
from within the php code
No I don't
I call my railway db tho
is the database operational?
lemme check
Working
when was the last time you redeployed your service
I can't run any queries on client side tho
I wouldn't trust anything the data tab in railway says or does, always use a proper database client
Okay, I did so that's good
Last time I redeployed was today? but before that?
6 months ago
since you redeployed it today does it work again
No the redeploy from today broke it
click the settings icon then enable line wrapping, then tell me more about what upstream timed out message
there was a big change to nixpacks, do you wanna try reverting to an old version of nixpacks? but to me this looks like a code issue that you could fix
I didn't update nixpacks
railway did
and how do I revert it
add a railway.toml file to your project with this in it
but before you do that, i think you should look into fixing the code issue
what would the code issue be?
I wouldn't know how to tell you that, I have never seen your code
does nixpacks upgrade php or somethin?
nixpacks 1.16.0 updated a lot of things
Okay, I'll try that. idk if that will help tho
I'm able to get 401 responses back for incorrect passwords. Seems database related?
you can always try restarting the database
but 401 for incorrect passwords seems like a perfectly reasonable response code
Yeah, that is correct. I'm saying that the 401 isn't timing out
awesome
Any easy way to deploy an old build?
go back to the last deployment that worked, click the 3 dot menu and then click redeploy
though I doubt railway keeps a deployment image around for 6 months
That unfortunately worked
what version of nixpacks did it use to build?
1.16
that's the current version, okay so this is just a code issue
Welp
welp indeed
My 6 month ago self did not make this easy to test locally
you'll have that on these jobs
guess who wasn't specifying the port on the sql connection?? me
guess who didn't set an appropriate connection timeout with error logging 🤣