Re: Could not resolve host name error in psycopg2

2020-04-17 Thread Paul Förster
Hi Adrian, > On 17. Apr, 2020, at 16:10, Adrian Klaver wrote: > > But most pools can grow and shrink in response to demand, so at some point > there are connect/disconnect cycles. yes, but it is a difference whether you see occasional growing and shrinking pool behavior, or the logs are flood

Re: Could not resolve host name error in psycopg2

2020-04-17 Thread Adrian Klaver
On 4/17/20 12:02 AM, Paul Förster wrote: Hi Adrian, On 17. Apr, 2020, at 03:00, Adrian Klaver wrote: Huh? Leaving open connections is not considered a good thing. In other words a connection should last for as long as it takes to get it's task done and then it should close. I basically ag

Re: Could not resolve host name error in psycopg2

2020-04-17 Thread Paul Förster
Hi Adrian, > On 17. Apr, 2020, at 03:00, Adrian Klaver wrote: > > Huh? Leaving open connections is not considered a good thing. In other words > a connection should last for as long as it takes to get it's task done and > then it should close. I basically agree on this, but there are two big

Re: Could not resolve host name error in psycopg2

2020-04-16 Thread derwin theduck
Thank you, I've changed it to use the server's IP address since, so I'll wait to see if the error happens again. On Fri, 17 Apr 2020 at 09:00, Adrian Klaver wrote: > On 4/16/20 5:38 PM, derwin theduck wrote: > > We have been getting this error intermittently (about once a week) in > > Django wit

Re: Could not resolve host name error in psycopg2

2020-04-16 Thread Adrian Klaver
On 4/16/20 5:38 PM, derwin theduck wrote: We have been getting this error intermittently (about once a week) in Django with channels since switching from a local database server to a hosted one: could not translate host name "timescaledb" to address: Name or service not known Connecting dir

Could not resolve host name error in psycopg2

2020-04-16 Thread derwin theduck
We have been getting this error intermittently (about once a week) in Django with channels since switching from a local database server to a hosted one: could not translate host name "timescaledb" to address: Name or service not known Connecting directly to the server with psycopg2 in the python