3 months ago
I’ve deployed my backend on Railway with a database connected. The issue is that it works fine for a while after I deploy, but then it just stops responding. Whenever I hit the backend with a request, it times out and doesn’t reply in time.
Right now I have to redeploy once or twice a day just to get it working again, which is pretty frustrating. I also have a big meeting today and really don’t want this to mess things up.
Can you please help me figure out what’s going on, or fix it from your side if possible?
project id: edf11695-2a90-4573-a360-85b19c89ac7d
service: f02f072c-d0d7-46f9-b79f-fb9f8de4cd1c
service 2: 5484d7cb-596b-46e6-92e1-7219766f47ad
Both of these services are same repo please fix this asap.
1 Replies
yes i did the db takes too long to repond and always request fails after some time of deployement with 502
i have deployed same backend on ngrok and it was working fine over there
i have other services over there aswell every other service is working fine just facing issue with these 2 services
you should add some better logging to your backend to identify the exact issue
we already did that it didn't helped much so we deployed on ngrok so we can identify issue in a better way
HTTP Status Code: 502 (Bad Gateway) for ALL requests
Error Rate: 100.00% (1,000 out of 1,000 requests failed)
Response Time: Extremely high at 15.59 seconds average
📈 Performance Metrics
Response Times:
Average: 15.59 seconds (extremely slow)
Minimum: 15.55 seconds
Maximum: 15.74 seconds
95th Percentile: 15.68 seconds
Server Overload: Your Railway deployment is likely overwhelmed by the load.
Resource Exhaustion: The server may have run out of memory, CPU, or database connections
Timeout Issues: The server is taking too long to respond, causing timeouts
can anyone can guide me on this
Railway rate limit of 500 logs/sec reached for replica, update your application to reduce the logging rate. Messages dropped: 2164
3 months ago
Where are you located geographically?
3 months ago
I would start by making sure all your services are in the Asia region. Most of your services are not deployed to our Asia region.
3 months ago
Then make sure they are all located closest to the users.
The next step would be to make sure the connection to the database is done via the private network.
how am i supposed to know this that the connection is via private or public
3 months ago
If you have your backend connect to the database via the TCP proxy, then you are connecting to it via the public network.
we simply connected mysql with our node application using credetials provided by railway
3 months ago
Have your backend connect to the database via the private network.
3 months ago
Let's start by doing step 1 first.
Then make sure they are all located closest to the users.
3 months ago
I've bountied this thread so that other community members may come to your aid.
https://discord.com/channels/713503345364697088/1372169430091698289/1414420449273577472
3 months ago
Are you sure its all connected? edit the app so that it console logs the db credentials
