Re: pgsql server reset the connection immediately after connected

From: Dongkuo Ma <luc(dot)mdk(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgsql server reset the connection immediately after connected
Date: 2012-11-02 02:57:02
Message-ID: CAMccLyfdm_VfyWerBYYeYtkfLQtsyzn00U5O1Mp9ZKPZDC+eDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi
the python code is

logging.info("database connecting...")
conn = connect(database="dbname", user="user",
password="password",host="127.0.0.1")
logging.info("database connected")
conn.autocommit = True
conn.set_client_encoding('UTF8')
cur = conn.cursor()
#the above code executed without exception
#and [server closed the connection unexpectedly] thrown when any
cur.execute() called
I think it's strange because the server reset connection after
connected,and the connect function should throw a exception.

It's nothing in the log file.

Thanks.

On Fri, Nov 2, 2012 at 10:42 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

> On 11/01/2012 07:32 PM, Dongkuo Ma wrote:
>
>> Sorry!
>> I typed the enter key and sent the uncomplete message.
>>
>>
>> The psycopg2 connect function succesed,but throw a exception
>>
>> server closed the connection unexpectedly
>> This probably means the server terminated abnormally before or while
>> processing the request.
>>
>> when executing any sql statement.
>>
>
> What is the Python code being used?
>
>
>
>> Using tcpdump, I found the server reset the connection immediately
>> after connected, and i cann't find any log about this.
>>
>
> Should be in /var/log/postgresql
>
>
> This is the tcpdump log http://pastebin.com/uW0at4Zd
>>
>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-11-02 03:17:38 Re: pgsql server reset the connection immediately after connected
Previous Message Jeff Janes 2012-11-02 02:51:26 Re: Corrupt Incrementally Updated Backup: missing pg_clog file