Re: [sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread Mike Bayer
On Tue, Feb 6, 2018 at 1:36 PM, André Cruz wrote: > Hello Mike. > > > On 6 Feb 2018, at 16:36, Mike Bayer wrote: > > So it's only using SQLAlchemy''s pool functionality to manage Django DB > connections. I guess I just have to pass the "dbapi=psycopg2" parameter when > creating the dialect? > > >

Re: [sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread André Cruz
Hello Mike. > On 6 Feb 2018, at 16:36, Mike Bayer wrote: > >> So it's only using SQLAlchemy''s pool functionality to manage Django DB >> connections. I guess I just have to pass the "dbapi=psycopg2" parameter when >> creating the dialect? > > yes or report it as a bug over to that project, the

Re: [sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread Mike Bayer
On Tue, Feb 6, 2018 at 11:32 AM, André Cruz wrote: > Hello Mike. > > On 6 Feb 2018, at 16:24, Mike Bayer wrote: > > it is unusual for people to use the pool without an engine like that. > You can always get a pool by creating an engine normally and then > grabbing engine.pool. When the engine i

Re: [sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread André Cruz
Hello Mike. > On 6 Feb 2018, at 16:24, Mike Bayer wrote: > > it is unusual for people to use the pool without an engine like that. > You can always get a pool by creating an engine normally and then > grabbing engine.pool. When the engine is created one of the things > it does is load up the D

Re: [sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread Mike Bayer
On Tue, Feb 6, 2018 at 10:14 AM, wrote: > Hello. > > I'm using a connection pool backed by SQLAlchemy (1.2.1) to access a > Postgresql (9.6) server using the psycopg2 (2.7.3.2) driver. I have the > following pool configuration options set: > > from sqlalchemy.dialects import postgresql > DATABASE

[sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread andre
Hello. I'm using a connection pool backed by SQLAlchemy (1.2.1) to access a Postgresql (9.6) server using the psycopg2 (2.7.3.2) driver. I have the following pool configuration options set: from sqlalchemy.dialects import postgresql DATABASE_POOL_ARGS = { 'max_overflow': 0, 'pool_size':