R
Railway6mo ago
amjad

After migrating to new database my application get crashed donot know how? Please help

my site ssdo.org.pk get crashed please help , I am running strapi at the backend
46 Replies
Percy
Percy6mo ago
Project ID: c646e44b-a2dd-41c4-94de-c0f00566da1d
amjad
amjad6mo ago
c646e44b-a2dd-41c4-94de-c0f00566da1d
Zazh
Zazh6mo ago
What errors do you get in logs?
amjad
amjad6mo ago
Server was not able to start properly
amjad
amjad6mo ago
No description
amjad
amjad6mo ago
These are the deploy logs
Zazh
Zazh6mo ago
It looks like it can't connect to an external server. because of the ECONNREFUSED
amjad
amjad6mo ago
Some problems with envirnomental varialbes?
Zazh
Zazh6mo ago
Maybe, try changing the variable to what you use now if it is a variable
amjad
amjad6mo ago
Which variable I try
Zazh
Zazh6mo ago
Hm, it seems like it's a google cloud ip. You said this is the frontend?
amjad
amjad6mo ago
After migration which env variables are changed?
Zazh
Zazh6mo ago
The database URLs
amjad
amjad6mo ago
Database url means database host?
Zazh
Zazh6mo ago
No, the url contains the host. the host is something like this: roundhouse.proxy.rlwy.net Copy the private URL then paste it where it needs it
amjad
amjad6mo ago
containers-us-west-136.railway.app , i was using this before
Zazh
Zazh6mo ago
yea, it probably changed from the migration go to the new service and go to variables then find MYSQL_PRIVATE_URL then paste it into your service
amjad
amjad6mo ago
I m using postgres
Zazh
Zazh6mo ago
Ok let me find that for that
amjad
amjad6mo ago
new service means strapi
Zazh
Zazh6mo ago
DATABASE_PRIVATE_URL
amjad
amjad6mo ago
from where i copy it from my postgres database
Zazh
Zazh6mo ago
in the variabled
amjad
amjad6mo ago
in my strapi application I use this ${{Postgres.DATABASE_URL}} in my Database_url, there is no database_private_url in strapi
Zazh
Zazh6mo ago
that should work, but you'll be charged for egress. can you send the full logs? https://bookmarklets.up.railway.app/log-downloader/
amjad
amjad6mo ago
deploy logs?
Zazh
Zazh6mo ago
yea
amjad
amjad6mo ago
ok how can i send the logs
Zazh
Zazh6mo ago
you drag the file it downloaded here
amjad
amjad6mo ago
copy paste is not acceptable here not able to send the txt file
Zazh
Zazh6mo ago
how come?
amjad
amjad6mo ago
Zazh
Zazh6mo ago
you said this is the backend or frontend?
amjad
amjad6mo ago
strapi is the used as admin for the database basically its a headless cms
Zazh
Zazh6mo ago
ok i'll see if i can reproduce
amjad
amjad6mo ago
postgres is the database and strapi is the service using it
Zazh
Zazh6mo ago
ok
amjad
amjad6mo ago
strapi is showing the records of postgres database and strapi is crashed after migration while migration runs successfully according to the railway dashboard
Zazh
Zazh6mo ago
hm yea sounds like something might have went wrong?
Brody
Brody6mo ago
thank you for helping, but please do not instruct people to copy paste database variables, that is exactly what has caused this issue in the first place, please use reference variables
Zazh
Zazh6mo ago
i meant the variable name not the value itself
Brody
Brody6mo ago
it can be misinterpreted, please instruct direct use of the reference variables
Zazh
Zazh6mo ago
sorry
Brody
Brody6mo ago
no worries I appreciate the help
amjad
amjad6mo ago
Thanks for your positive response.....I have corrected the error no need to do anything now, site is up and running , thanks
Brody
Brody6mo ago
happy to hear!