Search Postgresql Archives

Re: Error: no connection to the server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marco Bambini wrote:
> I have a multithreaded C client and sometimes I receive the "no connection to the server" error
> message.
> I haven't found any documentation about it and about how to fix this issue.
> 
> Anyone can point me to the right direction?

The error message is reported in interfaces/libpq/fe-exec.c:

static bool
PQsendQueryStart(PGconn *conn)
{
    if (!conn)
        return false;

    /* clear the error string */
    resetPQExpBuffer(&conn->errorMessage);

    /* Don't try to send if we know there's no live connection. */
    if (conn->status != CONNECTION_OK)
    {
        printfPQExpBuffer(&conn->errorMessage,
                          libpq_gettext("no connection to the server\n"));
        return false;
    }

So it looks like you closed the connection (maybe in some other thread)
and then try to reuse it.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux