R
Railway7mo 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
Percy7mo ago
Project ID: dea35d60-86ea-4917-9704-c765da9d6e4b
Brody
Brody7mo ago
anyone who comes to help will need your deployment logs, please provide those https://bookmarklets.up.railway.app/log-downloader/
saj
saj7mo 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
Brody7mo ago
please use the bookmarklet
saj
saj7mo 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
Brody7mo ago
mind sending the build logs for the last deployment that did work?
saj
saj7mo 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
Brody7mo ago
that couldnt hurt, please try that. but are you able to send the build logs for the last deployment that worked?
saj
saj7mo ago
I believe these are the logs from the last time that it worked, deployed around 24 days ago.
Brody
Brody7mo ago
i see a different start command? hypercorn main:app --bind "[::]:$PORT" vs python main.py from your latest deployment
saj
saj7mo 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
Brody7mo ago
here try this https://bookmarklets.up.railway.app/service-redeploy/ instead of changing something on github
Solution
Brody
Brody7mo 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
saj7mo ago
This worked! Thank you so much!
Brody
Brody7mo ago
yeah looks like railway re-deployed a much much older version of your code and things just got wonky
saj
saj7mo ago
Strange that the "re-deploy" does not fetch from Github, this could be an improvement.
Brody
Brody7mo ago
i wish haha but thats why the bookmarklet exists
Brody
Brody7mo ago
but for clarity, was this the button you used?
No description
saj
saj7mo 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
Brody7mo ago
i made them
saj
saj7mo ago
Yes this is exactly what I did.
Brody
Brody7mo ago
@matt - 3 dot menu > redeploy, deployed old code
saj
saj7mo 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
Brody7mo ago
the index is here https://bookmarklets.up.railway.app/ things ive built that i feel railway should have as features by default
saj
saj7mo ago
Will surely check them out, thanks!
Brody
Brody7mo ago
no problem!