App -> Postgres DNS Issue

Hey,
For the last bit I’ve had trouble with an app reaching an attached Postgres instance – basically, when I restart the app it can connect, and will for an hour, and then after almost exactly an hour the app will no longer be able to resolve the hostname of the Postgres instance. My application logs contain:

 2024-03-04T02:33:03.217 app[e784930bd9d583] dfw [info] {"level":"warn","config_file_source":"/nix/store/4f9zfhxz8rz1xgns6dr21vc1j5a0yazq-config.yaml","bootstrap":true,"error":"rpc error: code = Unknown desc = failed to connect to `host=pomerium-db.flycast user=pomerium_proxy database=pomerium`: hostname resolving error (ip addr wasn't found)","lease_name":"identity_manager","time":"2024-03-04T02:33:03Z","message":"leaser: error acquiring lease"} 

A restart is enough to get it working, but again, only for an hour. This app was previously working for ~3 months unattended with the exact same configuration – the fact that it works for the first hour seems to indicate that there is not a configuration issue in my application. Did not see anything on the status issue – anything application configuration-wise I could be missing?

Hey @devusb

Can you please check if you are able to resolve pomerium-db.flycast name with dig from inside your app’s machine (e784930bd9d583) when this is happening?

$ dig aaaa pomerium-db.flycast

@pavel thanks for the response – as soon as I saw the output from dig I realized this was self-inflicted and found the error in my configuration. All good now.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.