App wont work properly

For some reason my app https://opdeckdoctor-production.up.railway.app/ won't work properly. I checked it locally and it works with Railway database aswell, so it's not a database problem. https://opdeckdoctor-production.up.railway.app/all_leaders This site shows Server Error (500) and I have no clue why, because it shows no errors locally.
30 Replies
Percy
Percy9mo ago
Project ID: e7bdc974-80ce-40e2-830b-867a91640a47
Rambo Żubr
Rambo Żubr9mo ago
e7bdc974-80ce-40e2-830b-867a91640a47
Brody
Brody9mo ago
what errors do you get in the deployment logs?
Rambo Żubr
Rambo Żubr9mo ago
[2023-11-03 22:36:50 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:12) [2023-11-03 22:36:50 +0000] [12] [INFO] Worker exiting (pid: 12) [2023-11-03 22:36:50 +0000] [1] [ERROR] Worker (pid:12) exited with code 1 [2023-11-03 22:36:50 +0000] [1] [ERROR] Worker (pid:12) exited with code 1. [2023-11-03 22:36:50 +0000] [13] [INFO] Booting worker with pid: 13
Brody
Brody9mo ago
locally, when you make the exact same request, how long does the request take?
Rambo Żubr
Rambo Żubr9mo ago
it happens in an instant
Brody
Brody9mo ago
and thats really all there is in the deployment logs?
Rambo Żubr
Rambo Żubr9mo ago
This site shows around 50 pngs with filters, but another one that shows around 1000pngs with more filters works just fine
Brody
Brody9mo ago
looks like there is an error in the code but you arent logging any errors are you sure the database connection works? you dont have a success message for database connections
Rambo Żubr
Rambo Żubr9mo ago
https://opdeckdoctor-production.up.railway.app/collector/ This works just fine, and it also connects to the database, although a different table. I'll make sure it connects!
Brody
Brody9mo ago
but yeah this is just a code issue thats causing a hold up and then gunicorn kills the connection since it took longer than the default of 30 seconds add as much error handling and logging as you can, because as of right now you dont have any, and without error logs it would be very hard to debug
Rambo Żubr
Rambo Żubr9mo ago
Thanks, I'll do that and message here again if I don't resolve my issue. Thank You very much
Brody
Brody9mo ago
no problem!
Rambo Żubr
Rambo Żubr9mo ago
Ok issue is resolved, there was a giant waste of time in sorting, never catched it locally, no idea why it worked properly 😄
Brody
Brody9mo ago
these things happen
Rambo Żubr
Rambo Żubr9mo ago
Only issue left for now is with Google SMTP but I'll try to do this on my own, thank You for all the help
Brody
Brody9mo ago
google smtp wont work they block logins that arent done from an actual user
Rambo Żubr
Rambo Żubr9mo ago
oh, ok. Is there any recommended email host? It's just for email veryfication, shoul be really low-traffic
Brody
Brody9mo ago
I use Zoho with a domain I own
pandas
pandas9mo ago
It will Normal gmail account over SMTP will work fine, so will gsuite account which allows SMTP and API mail sending For SMTP you wanna use app password from gmail, please check this https://www.mailwarm.com/resources/how-to-set-up-gsuite-smtp
Brody
Brody9mo ago
i have seen very very few people have success with gmail on railway, i am only speaking from experience
jerome
jerome8mo ago
Do you use their free tier?
Brody
Brody8mo ago
i do
jerome
jerome8mo ago
sorry if I come across as completely obtuse, but how do you access the SMPT settings on a free account?
Brody
Brody8mo ago
you can just Google "Zoho SMTP" then you'll get a result for a Zoho docs page that tells you the SMTP host and port, credentials are your email and password
jerome
jerome8mo ago
HAHAHA!!! Brilliant!
Brody
Brody8mo ago
Google is always the answer
jerome
jerome8mo ago
Hm... Not working on my end. Looks like there might be no getting around the "feature is not available for your account" paywall.
Brody
Brody8mo ago
at this point can you please open your own help thread?