R
Railway11mo 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
Percy11mo ago
Project ID: N/A
Brody
Brody11mo ago
can you provide me a way to replicate this error?
Madlabs
MadlabsOP11mo 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
Brody11mo ago
right but how can i experience this for myself
Madlabs
MadlabsOP11mo ago
I can send you the url of the application, and you can try registering or I can send you a picture
Brody
Brody11mo ago
send the url please
Madlabs
MadlabsOP11mo 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
Brody11mo ago
yeah i see, your app is crashing
Madlabs
MadlabsOP11mo ago
yes
Brody
Brody11mo ago
and you said there are no logs during this what so ever?
Madlabs
MadlabsOP11mo ago
yes, Inside railway I don't see any logs it only gives me deployment logs
Brody
Brody11mo ago
thats the logs you would want to be looking at
Madlabs
MadlabsOP11mo 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
Brody11mo 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
MadlabsOP11mo 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
Brody11mo ago
of course, this isnt a limitation or issue with railway but a code / config / access issue
Madlabs
MadlabsOP11mo ago
ok, thanks. I will come back with more soon.
Brody
Brody11mo ago
sounds good
maddsua
maddsua11mo 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
Brody11mo ago
no we cant because they aren't running an smtp server but quick question what email provider are you using?
Madlabs
MadlabsOP11mo ago
I am not sure about it, but I am trying to use django.core.mail.backends.smtp.EmailBackend
Brody
Brody11mo ago
yes but with what email provider?
maddsua
maddsua11mo ago
I mean this thing looks awfully like a server to me tbh
Madlabs
MadlabsOP11mo ago
the email is with smtp.dreamhost.com SMTP Port 465
Brody
Brody11mo ago
its an smtp client, what makes you think its an smtp server??
maddsua
maddsua11mo ago
oh nvm that's more likely a client
Brody
Brody11mo ago
ofc
maddsua
maddsua11mo ago
yeah it def is
Madlabs
MadlabsOP11mo 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
Brody11mo 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
MadlabsOP11mo 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