Service crashing

Hi. I'm using nodemailer to send email. It works fine on localhost but when i deployed on Railway so it stop working? I still couldn't find out why. Does Railway block the port 465 & 587?
Solution:
that looks like you ran out of memory, the trial plan only has 512mb of ram, so upgrade to the dev plan for access to 8gb of memory!
Jump to solution
33 Replies
Percy
Percy17mo ago
Project ID: N/A
nguyenha4802
nguyenha480217mo ago
N/A
Brody
Brody17mo ago
well first, are there any error messages?
nguyenha4802
nguyenha480217mo ago
there are no error message
Brody
Brody17mo ago
I'm gonna need error messages to help you debug this, if something is not working but there's no error messages, it means you aren't logging errors
nguyenha4802
nguyenha480217mo ago
do you mean this?
Solution
Brody
Brody17mo ago
that looks like you ran out of memory, the trial plan only has 512mb of ram, so upgrade to the dev plan for access to 8gb of memory!
Adam
Adam17mo ago
a service can only expose one port
nguyenha4802
nguyenha480217mo ago
I want to upgrade to the dev plan. But wonder that will it support nodemailer?
Brody
Brody17mo ago
you can't run a mail server regardless of the plan, but you can definitely send mail with nodemailer
nguyenha4802
nguyenha480217mo ago
here is my email sending not sure why it is not sending email?
Brody
Brody17mo ago
do you still see this when trying to send the email?
Brody
Brody17mo ago
if you are still seeing those logs then this is still applicable https://discord.com/channels/713503345364697088/1121328957170655323/1121338140976762940
nguyenha4802
nguyenha480217mo ago
no it is working but i got this
Brody
Brody17mo ago
looks like you got your credentials wrong are you storing the credentials in the railway service variables?
nguyenha4802
nguyenha480217mo ago
yes i store it in service variables
Brody
Brody17mo ago
can I see a screenshot of the service variables please
nguyenha4802
nguyenha480217mo ago
Brody
Brody17mo ago
okay and show me how you are using them in code?
nguyenha4802
nguyenha480217mo ago
it's store in my .env
nguyenha4802
nguyenha480217mo ago
nguyenha4802
nguyenha480217mo ago
and it works here
nguyenha4802
nguyenha480217mo ago
nguyenha4802
nguyenha480217mo ago
by this i'm creating an url to send verify link to customer
Brody
Brody17mo ago
have you tried logging those two environment variables when in railway?
nguyenha4802
nguyenha480217mo ago
yes
Brody
Brody17mo ago
and? bruh did you just send me your Gmail password
nguyenha4802
nguyenha480217mo ago
its just a test gmail not really worry it's an app password
Brody
Brody17mo ago
well nodemailer said your credentials are incorrect are you sure you are using nodemailer correctly
nguyenha4802
nguyenha480217mo ago
acctualy i tried to deployed on other platform and it's working i'm not sure why in Railway not working wait in this case i need to use gmail password or an app password?
Brody
Brody17mo ago
I'm not sure also Gmail itself could be blocking your login attempt, that's a possibility whatever the issue, railway itself is not blocking you from sending emails, I promise you that much
nguyenha4802
nguyenha480217mo ago
ok let me find out the solution
Brody
Brody17mo ago
sounds good!
Want results from more Discord servers?
Add your server