R
Railway•15mo ago
ethan

PHP Gateway Timeout

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