Project deploys successfully then crashes after a minute or 2
Project-id:a152df40-b98b-4053-afe7-e4c47c064cca
My Golang application builds and deploys successfully but then suddenly crashes. I don't see any log messages
28 Replies
Project ID:
a152df40-b98b-4053-afe7-e4c47c064cca
before the minute or two, does it work?
no it doesn't
do you see any logs at all? of any kind
just build logs
no deploy logs
send the build logs please https://bookmarklets.up.railway.app/log-downloader/
looks fine, share your repo please
GitHub
GitHub - zachzafar/realestate-app
Contribute to zachzafar/realestate-app development by creating an account on GitHub.
do you have
APP_ENV
set to PRODUCTION
?yeah i do in railway
you have your logger set to output to a file
does writing to storage cause issues ?
well no but how are you going to see deploy logs if you log to a file
but even if i didn't usually i think if there was a fatal error I would see something in the terminal like exit status 1or something like that
you are using the file based logger for the fatal errors
i'll make the change redeploy and see what i get
thanks
its working now I'm just waiting to see if the domain works
I used the wrong URL it seems from the postgres instance
i used the private url instead of public
nothing wrong with the private url
lool i don't know then ill send the log message now
dial tcp: lookup postgres.railway.internal on 8.8.8.8:53: no such host
add a 3 second sleep in code before you do anything with the database
it worked with the public url though
I'll try it
right now the only thing is that the domain isn't working
your code needs to listen on the environment variable
PORT
do i have to set that variable myself ?
in the variables section
nope its set for you, your code just needs to listen on it
its working
thanks Bro...dy
no problem