Re: [sqlalchemy] SQLAlchemy asyncio ThreadPoolExecutor “Too many clients”

2016-09-28 Thread Viktor Roytman
Yes, the problem was the call to engine.dispose() Thanks! On Wednesday, September 28, 2016 at 5:11:59 PM UTC-4, Mike Bayer wrote: > > > > it would appear that either the ThreadExecutorPool is starting more > threads than your Postgresql database has available connections, or your >

Re: [sqlalchemy] SQLAlchemy asyncio ThreadPoolExecutor “Too many clients”

2016-09-28 Thread Mike Bayer
On 09/28/2016 04:51 PM, Viktor Roytman wrote: I wrote a script with this sort of logic in order to insert many records into a PostgreSQL table as they are generated. | |#!/usr/bin/env python3 importasyncio fromconcurrent.futures importProcessPoolExecutoraspool fromfunctools importpartial

[sqlalchemy] SQLAlchemy asyncio ThreadPoolExecutor “Too many clients”

2016-09-28 Thread Viktor Roytman
I wrote a script with this sort of logic in order to insert many records into a PostgreSQL table as they are generated. #!/usr/bin/env python3 import asyncio from concurrent.futures import ProcessPoolExecutor as pool from functools import partial import sqlalchemy as sa from