R
Railway10mo ago
Madlabs

django email backends

Is it possible to implement django.core.mail.backends.smtp.EmailBackend in railway? Trying to use this functionality for user registration email validation feature. I tested in localhost and its working without any issues. However, when deployed to Railway, upon a new user registration, it just shows the page with "Go to Railway" button. I am not able to see any error or logs which tells me the issue. Does anyone know what could be the issue?
31 Replies
Percy
Percy10mo ago
Project ID: N/A
Brody
Brody10mo ago
can you provide me a way to replicate this error?
Madlabs
Madlabs10mo ago
On the registration form, when user clicks on register, the page shows spinning for few seconds and then shows me the railway page there is no error or message that I can tell you
Brody
Brody10mo ago
right but how can i experience this for myself
Madlabs
Madlabs10mo ago
I can send you the url of the application, and you can try registering or I can send you a picture
Brody
Brody10mo ago
send the url please
Madlabs
Madlabs10mo ago
Register Page - Madlabs
Ladlabs Prep provides bite-sized SAT exam prep practice tests to make daily practicising easy. SAT Tests covers English, Vocabulary, Reading Comprehension, Grammar and Math sections Algebra, Geometry, Trigonometry. Seperate sections for Mental Math and Logical and Analytical reasoning.
Brody
Brody10mo ago
yeah i see, your app is crashing
Madlabs
Madlabs10mo ago
yes
Brody
Brody10mo ago
and you said there are no logs during this what so ever?
Madlabs
Madlabs10mo ago
yes, Inside railway I don't see any logs it only gives me deployment logs
Brody
Brody10mo ago
thats the logs you would want to be looking at
Madlabs
Madlabs10mo ago
[2024-01-16 18:27:12 +0000] [7] [CRITICAL] WORKER TIMEOUT (pid:140) @replica: 9a77b73f-949c-4abe-8f5e-9983594df9db View in Context it does not tell me anything
Brody
Brody10mo ago
it tell me that the http post request took longer than 30 seconds so the connection was killed, it should never take 30 seconds, so theres an error in your code but you arent logging it i would recommend you to add more verbose logging so we can find out where the slow down is coming from
Madlabs
Madlabs10mo ago
ok, I will ask the developer to add logging but does Railway allow this feature of sending email. I mean, if it is not blocking anything?
Brody
Brody10mo ago
of course, this isnt a limitation or issue with railway but a code / config / access issue
Madlabs
Madlabs10mo ago
ok, thanks. I will come back with more soon.
Brody
Brody10mo ago
sounds good
maddsua
maddsua10mo ago
can we address the elephant in the room and mention that smtp server won't work with railway? or it's not relevant here?
Brody
Brody10mo ago
no we cant because they aren't running an smtp server but quick question what email provider are you using?
Madlabs
Madlabs10mo ago
I am not sure about it, but I am trying to use django.core.mail.backends.smtp.EmailBackend
Brody
Brody10mo ago
yes but with what email provider?
maddsua
maddsua10mo ago
I mean this thing looks awfully like a server to me tbh
Madlabs
Madlabs10mo ago
the email is with smtp.dreamhost.com SMTP Port 465
Brody
Brody10mo ago
its an smtp client, what makes you think its an smtp server??
maddsua
maddsua10mo ago
oh nvm that's more likely a client
Brody
Brody10mo ago
ofc
maddsua
maddsua10mo ago
yeah it def is
Madlabs
Madlabs10mo ago
is there a document that I can follow or if anyone has used it before? I followed the djago documentation an it works fine in localhost, no issues there
Brody
Brody10mo ago
just follow the django docs, sending emails via an smtp client has little to do with railway with that said, dreamhost could be blocking you and with that said, you still need verbose logging
Madlabs
Madlabs10mo ago
ok I have some pointers now to go back and check thanks to both of you
Want results from more Discord servers?
Add your server