High response time from webserver to PG database
Hello π
Since a few hours (maybe yesterday), we noticed a big increase in response time on our production API.
It seems to be due to database latency, as the baseline runtime for our /ping endpoint (that does a dummy select to the DB) is >200ms.
It only happens on our production env, everything seems fine on the staging env (<20ms for the /ping endpoint)
project id: 946c760b-c58f-4c9a-98b8-b3fe1d360c6c
production ping: https://heatpump-backend-production.up.railway.app/ping/
staging ping: https://heatpump-backend-staging.up.railway.app/ping/
(there is a X-Runtime header in the response, so we ignore latency to end user)
Is there any way to diagnose what's happening?
Thanks !
Solution:Jump to solution
1. is your database in the same region as your service?
2. are you using the private database url?...
4 Replies
Project ID:
946c760b-c58f-4c9a-98b8-b3fe1d360c6c
Solution
1. is your database in the same region as your service?
2. are you using the private database url?
1. yes
2. that was the issue, did not mind trying as staging was using the public url and was fine
Sorry for the inconvenience !
Thanks
no worries, happy to help!