I get the error OperationalError: FATAL: sorry, too many clients are already using psycopg2. I call the close method on my connection instance after I have finished with it. I'm not sure what could be the reason for this, this is my first experience with python and postgresql, but I have several years of experience working with php, asp.net, mysql and sql servers.
EDIT: I run it locally, if the connections are closed, as it should be, then I only have one connection open at a time. I had a GUI open to the database, but even closed. I get this error. This happens very soon after starting my program. I have a function that I call that returns a connection that opens, for example:
psycopg2.connect (ConnectionString)
thanks
Final Edit: It was my mistake, I recursively called the same method by mistake, which opened the same method again and again. It's been a long day.
python postgresql psycopg2
Greg
source share