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
Percy13mo ago
Project ID: e7bdc974-80ce-40e2-830b-867a91640a47
Rambo Żubr
Rambo ŻubrOP13mo ago
e7bdc974-80ce-40e2-830b-867a91640a47
Brody
Brody13mo ago
what errors do you get in the deployment logs?
Rambo Żubr
Rambo ŻubrOP13mo 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
Brody13mo ago
locally, when you make the exact same request, how long does the request take?
Rambo Żubr
Rambo ŻubrOP13mo ago
it happens in an instant
Brody
Brody13mo ago
and thats really all there is in the deployment logs?
Rambo Żubr
Rambo ŻubrOP13mo ago
This site shows around 50 pngs with filters, but another one that shows around 1000pngs with more filters works just fine
Brody
Brody13mo 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 ŻubrOP13mo 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
Brody13mo 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 ŻubrOP13mo ago
Thanks, I'll do that and message here again if I don't resolve my issue. Thank You very much
Brody
Brody13mo ago
no problem!
Rambo Żubr
Rambo ŻubrOP13mo 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
Brody13mo ago
these things happen
Rambo Żubr
Rambo ŻubrOP13mo 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
Brody13mo ago
google smtp wont work they block logins that arent done from an actual user
Rambo Żubr
Rambo ŻubrOP13mo ago
oh, ok. Is there any recommended email host? It's just for email veryfication, shoul be really low-traffic
Brody
Brody13mo ago
I use Zoho with a domain I own
pandas
pandas13mo 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
Brody13mo ago
i have seen very very few people have success with gmail on railway, i am only speaking from experience
jerome
jerome12mo ago
Do you use their free tier?
Brody
Brody12mo ago
i do
jerome
jerome12mo ago
sorry if I come across as completely obtuse, but how do you access the SMPT settings on a free account?
Brody
Brody12mo 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
jerome12mo ago
HAHAHA!!! Brilliant!
Brody
Brody12mo ago
Google is always the answer
jerome
jerome12mo 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
Brody12mo ago
at this point can you please open your own help thread?
Want results from more Discord servers?
Add your server