'Python: psycopg2.OperationalError: FATAL: connection limit
How do I resolve this error in my python script:
conn=psycopg2.connect(dbname=dbname, host=host, port=port, user=rsuser, password=password)
File "/usr/local/lib/python3.7/site-packages/psycopg2/__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: connection limit "498" exceeded for non-superusers
I am connecting to a Redshift database, and my script was missing the connection close, but now how to I remove the connections so I can proceed?
Solution 1:[1]
Faced similar issue, while making call to Redshift. Reduced batch size and it worked for me. Try reducing the batch size for your call.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | saksham seth |
