Closed liquidpeachy closed 2 years ago
Are you making a new db = dataset.connect()
call very often? this seems odd if it's just dataset running against the instance. in any case you can call db.close()
to dispose of all the connections opened by a db
. Afterwards, the object becomes useless, of course.
I'm using the UPSERT in Dataset and when handling large amounts of data, I'm running into this error:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: sorry, too many clients already
Is there a way I can close the connection? or Something better?
Thank you.