R
Railway12mo ago
saj

I get server error 500, and no logs

I was on the trial plan for railway which ended around 20 days ago. As I was on vacations, and did not have my card setup, therefore the subscription failed to renew and my API was removed/disabled. I recently purchased the hobby plan, and re-deployed my code (from the option in railway, and not by changing anything on Github) as it had stopped due to non-payment and removed. Now, it says redeployment successful, but when I try to access the endpoint I get a 500 server error, with no logs on what's happening. The deployment logs says that the build was successful?! I do not want the API URI to change, as all my mobile applications are using it. Please help. Deployment id: dea35d60-86ea-4917-9704-c765da9d6e4b
Solution:
the redeploy you used on railway does not re-fetch and re-deploy your repo, so there is a chance it re-deployed much older code, this bookmarklet will deploy from github again
Jump to solution
26 Replies
Percy
Percy12mo ago
Project ID: dea35d60-86ea-4917-9704-c765da9d6e4b
Brody
Brody12mo ago
anyone who comes to help will need your deployment logs, please provide those https://bookmarklets.up.railway.app/log-downloader/
saj
sajOP12mo ago
My log explorer is empty, where as I get this error when I try to access the API/deployed web-application.
No description
No description
Brody
Brody12mo ago
please use the bookmarklet
saj
sajOP12mo ago
These are the build logs, the deployment logs are empty and when using the bookmarklet to fetch them I get a prompt saying "The API didn't return any log lines".
Brody
Brody12mo ago
mind sending the build logs for the last deployment that did work?
saj
sajOP12mo ago
This one worked like a charm, the thing is that it got suspended due to non-payment, and when I redeployed, it does not work anymore. Nothing has changed on the Github, so in theory it should work as previous. What do you suggest, I redeploy it by pushing something on Github?
Brody
Brody12mo ago
that couldnt hurt, please try that. but are you able to send the build logs for the last deployment that worked?
saj
sajOP12mo ago
I believe these are the logs from the last time that it worked, deployed around 24 days ago.
Brody
Brody12mo ago
i see a different start command? hypercorn main:app --bind "[::]:$PORT" vs python main.py from your latest deployment
saj
sajOP12mo ago
The thing that frustrates me is that I am getting a internal server 500 error and ZERO logs to get an idea of what's going on. Even the slightest hint of what's wrong will guide me in the right direction. Interesting, let me check this, strange that I did not change anything, and just redeployed after the account was restored.
Brody
Brody12mo ago
here try this https://bookmarklets.up.railway.app/service-redeploy/ instead of changing something on github
Solution
Brody
Brody12mo ago
the redeploy you used on railway does not re-fetch and re-deploy your repo, so there is a chance it re-deployed much older code, this bookmarklet will deploy from github again
saj
sajOP12mo ago
This worked! Thank you so much!
Brody
Brody12mo ago
yeah looks like railway re-deployed a much much older version of your code and things just got wonky
saj
sajOP12mo ago
Strange that the "re-deploy" does not fetch from Github, this could be an improvement.
Brody
Brody12mo ago
i wish haha but thats why the bookmarklet exists
Brody
Brody12mo ago
but for clarity, was this the button you used?
No description
saj
sajOP12mo ago
Thank you so much for the assistance today man! I marked your answer as the solution. Btw how do you get all these bookmarklets?
Brody
Brody12mo ago
i made them
saj
sajOP12mo ago
Yes this is exactly what I did.
Brody
Brody12mo ago
@matt - 3 dot menu > redeploy, deployed old code
saj
sajOP12mo ago
Aren't they like listed somewhere on the railway website where I can explore them? Will look into the source code to find out more, there should be like a marketplace for these or something, I too will be interested in developing them
Brody
Brody12mo ago
the index is here https://bookmarklets.up.railway.app/ things ive built that i feel railway should have as features by default
saj
sajOP12mo ago
Will surely check them out, thanks!
Brody
Brody12mo ago
no problem!
Want results from more Discord servers?
Add your server