R
Railwayβ€’12mo ago
rom5031

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:
1. is your database in the same region as your service? 2. are you using the private database url?...
Jump to solution
4 Replies
Percy
Percyβ€’12mo ago
Project ID: 946c760b-c58f-4c9a-98b8-b3fe1d360c6c
Solution
Brody
Brodyβ€’12mo ago
1. is your database in the same region as your service? 2. are you using the private database url?
rom5031
rom5031OPβ€’12mo ago
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
Brody
Brodyβ€’12mo ago
no worries, happy to help!
Want results from more Discord servers?
Add your server