Postgres SSL SYSCALL error: EOF detected with python and psycopg

前端 未结 7 1912
误落风尘
误落风尘 2020-12-15 03:40

Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected

It only occurs when I add a WHE

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 04:08

    This issue occurred for me when I had some rogue queries running causing tables to be locked indefinitely. I was able to see the queries by running:

    SELECT * from STV_RECENTS where status='Running' order by starttime desc;
    

    then kill them with:

    SELECT pg_terminate_backend();
    

提交回复
热议问题