My web cannot connect to the database on the same environment.

I create a project which contains web container and databse mongodb. When I deploy my project locally, it can connect to remote mongodb. However, my online website cannot connect to the mongodb on the same environment. I don't know why. Could anyone help me?
18 Replies
Percy
Percy2y ago
Project ID: N/A
MantisInABox
MantisInABox2y ago
This may sound stupid to ask, but did you setup the environment variables on your service the same way you have them on local dev?
alexcao
alexcaoOP2y ago
Of course, it worked well yesterday. @MantisInABox
Brody
Brody2y ago
can you show me a screenshot of your service variables
alexcao
alexcaoOP2y ago
@Brody
Brody
Brody2y ago
can you connect to the database with something like dbgate?
alexcao
alexcaoOP2y ago
@Brody My local web connects to the database on Railway. It works well.
Brody
Brody2y ago
the same database, and the same database url that the service uses? okay this makes two reports of this issue, the team will look at it on monday
alexcao
alexcaoOP2y ago
@Brody I check it again. The connection to the dabase may not be the main problem. The problem is that my web container contains the front side and the backend side. When I deploy it locally, it works well. However, when I deploy it on the Railway, the request from the front side to the backend side fails. Actually, It works well yesterday. Moreover, My friend in the U.S. can visit it. People in China cannot visit it.
Brody
Brody2y ago
this seems like something the team would need to look into imo
alexcao
alexcaoOP2y ago
right, thanks for your reply. I would appreciate that the team can help me on Monday. @Brody Can anyone help me?
Brody
Brody2y ago
its in the hands of the team now, nothing more i can do here, im just a community member
Ray
Ray2y ago
What error are you seeing for the failed connections? can you share a project ID please? This was caused by https://railway.instatus.com/clik6k1hk294312awn8v8rox7a1. It should be fixed now, try again?
alexcao
alexcaoOP2y ago
@rc My friend outside China can visit the website. However, it cannot be connected in China. Is the project id the string in the project url? project id: b3c66cc3-91a2-4f35-bc3e-9c67478d9ab3.
Ray
Ray2y ago
that sounds like a separate issue can they visit any .up.railway.app domains inside China?
alexcao
alexcaoOP2y ago
I am not sure. Could you give me an url for trying?
Ray
Ray2y ago
https://utilities.up.railway.app/status-code/201 we've had issues with Chinese GFW blocking us in the past, which we can't do much about unfortunately
alexcao
alexcaoOP2y ago
I cannot access to it. Yes, I encounter this problem several months ago, but it restore in two days.
Want results from more Discord servers?
Add your server