Postgres logs filled with constant connection logs

I have a Node web app deployed connected to a Postgres database (all deployed via render.com free plan).

I am actually trying to investigate intermittent “Connection terminated unexpectedly” errors that plague my app, but when I look at my postgres logs, it is just an endless stream of connection/disconnect logs. I am not sure what is causing those connections.

Do other people see these logs? Is this expected? Or have I configured something incorrectly with my database?

Example of log spam:

Jun 16 04:39:15 PM  [1-1] user=[unknown],db=[unknown],app=[unknown],client=::1LOG:  connection received: host=::1 port=44222
Jun 16 04:39:15 PM  [2-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authenticated: identity="postgres" method=md5 (/pgdata/dpg-caft5cnh8vlatl9kv0hg-a/pg_hba.conf:10)
Jun 16 04:39:15 PM  [3-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authorized: user=postgres database=postgres application_name=psql SSL enabled (protocol=TLSv1.2, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256)
Jun 16 04:39:15 PM  [4-1] user=postgres,db=postgres,app=psql,client=::1LOG:  disconnection: session time: 0:00:00.098 user=postgres database=postgres host=::1 port=44222
Jun 16 04:39:25 PM  [1-1] user=[unknown],db=[unknown],app=[unknown],client=::1LOG:  connection received: host=::1 port=44274
Jun 16 04:39:25 PM  [2-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authenticated: identity="postgres" method=md5 (/pgdata/dpg-caft5cnh8vlatl9kv0hg-a/pg_hba.conf:10)
Jun 16 04:39:25 PM  [3-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authorized: user=postgres database=postgres application_name=psql SSL enabled (protocol=TLSv1.2, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256)
Jun 16 04:39:25 PM  [4-1] user=postgres,db=postgres,app=psql,client=::1LOG:  disconnection: session time: 0:00:00.102 user=postgres database=postgres host=::1 port=44274
Jun 16 04:39:35 PM  [1-1] user=[unknown],db=[unknown],app=[unknown],client=::1LOG:  connection received: host=::1 port=44334
Jun 16 04:39:35 PM  [2-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authenticated: identity="postgres" method=md5 (/pgdata/dpg-caft5cnh8vlatl9kv0hg-a/pg_hba.conf:10)
Jun 16 04:39:35 PM  [3-1] user=postgres,db=postgres,app=[unknown],client=::1LOG:  connection authorized: user=postgres database=postgres application_name=psql SSL enabled (protocol=TLSv1.2, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256)
Jun 16 04:39:35 PM  [4-1] user=postgres,db=postgres,app=psql,client=::1LOG:  disconnection: session time: 0:00:00.192 user=postgres database=postgres host=::1 port=44334
1 Like

They are our Postgres health checks that we run.

You can remove 0.0.0.0 access to your database from the database settings in thedashboard so you know that anything you see in logs can be considered ‘normal’.

Regards,

John B

3 Likes

Thanks John! Super helpful.

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