DATABASE_PRIVATE_URL vs DATABASE_URL response time
michaelwehrley
HOBBYOP

a year ago

I am on the hobby plan and my server response times are between 1-1.5 seconds. I am looking to debug the reason for the slow response even though when query via Postico the queries take less than a 100 ms and it seems like non-db requests are reasonable like roughly 100 ms. When I set up the app, it seems I accidently set my DATABASE_PRIVATE_URL to be the same URL as the DATABASE_URL . My question is, could the connection via the non-private URL be the reason for the slow response and if so, how would I go about tryiing to find my old DATABASE_PRIVATE_URL? Thanks for any insights.

7 Replies

brody
EMPLOYEE

a year ago

You currently have - DATABASE_PRIVATE_URL="${{Postgres.DATABASE_URL}}"
Change that to DATABASE_PRIVATE_URL="${{Postgres.DATABASE_PRIVATE_URL}}"

> My question is, could the connection via the non-private URL be the reason for the slow response

Theres really no good way to know without any tracing in your application code.

But with 1-1.5 second response times, theres likely some bad code somewhere, tracing will help here, without tracing, it's going to be very hard to debug if you don't know what your code is doing.


michaelwehrley
HOBBYOP

a year ago

Thanks, but Postgres.DATABASE_URL and Postgres.DATABASE_PRIVATE_URL are the same url. Is that typical?


brody
EMPLOYEE

a year ago

They are most definitely not, what makes you think that?


michaelwehrley
HOBBYOP

a year ago

Well b/c mine our the same (when I reveal them). This is why if I change DATABASE_PRIVATE_URL to ${{Postgres.DATABASE_PRIVATE_URL}}" I am not sure that will make a difference b/c Postgres.DATABASE_URL and Postgres.DATABASE_PRIVATE_URL are unfortunately same. This is why I was wondering originally if I could find out what the original private URL was or update it to a new one. Thanks!


brody
EMPLOYEE

a year ago

They are not the same values, I have verified this myself on your Postgres database.

Please show me where you see the same values for those two variables.


michaelwehrley
HOBBYOP

a year ago

Thanks for your help! I was able to make the update. It does seem a bit odd, however, that when I reveal the values for those two variables, the revealed values that are displayed appear to be the same for my Postgres instance. I really do appreciate your speedy replies and help! Thank you!

Attachments


brody
EMPLOYEE

a year ago

I've just checked again on your postgres database, they are not the same values.


Loading...