Re: pgsql server reset the connection immediately after connected

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: pgsql server reset the connection immediately after connected
Дата
Msg-id CAPTjJmrm5HVu0+fggeTtTZrx=RAjFfp2Rf-VAB+mGqecMFy7ww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql server reset the connection immediately after connected  (Dongkuo Ma <luc.mdk@gmail.com>)
Список pgsql-general
On Fri, Nov 2, 2012 at 1:57 PM, Dongkuo Ma <luc.mdk@gmail.com> wrote:
> 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.

Is there a long delay between connecting and executing a query? It may
be that something disconnected you during that time. Or could the
server have been restarted?

Can you make a simple Python script that always fails in this way?

Chris Angelico


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: pgsql server reset the connection immediately after connected
Следующее
От: Dongkuo Ma
Дата:
Сообщение: Re: pgsql server reset the connection immediately after connected