Re: psqlodbc 08.00.0004 - questions

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: Együd Csaba <csegyud(at)vnet(dot)hu>
Cc: "Pgsql-Odbc(at)Postgresql(dot)Org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlodbc 08.00.0004 - questions
Date: 2005-01-18 21:16:00
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3412A75BE@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> Hi,
> 1. I examined the psqlodbc_xxxx.log and found that despite of the 13
> parallel established connections, only the last (conn = 1389704)
> connection
> is used for inserting. The application which connects to the server via
> the
> driver uses 13 parallel threads connecting thread by thread.

Question: what language are using to connect to the server? I can't directly answer your questions, but you may want to consider using the libpq library for more detailed control over your connection objects.

> 2. In which circumstances can occure that ODBC driver refuses a connection
> from the server. I ran into a problem, where the server reported that the
> client actively refused the connection. What does it mean?

Probably you are hitting your connection limit set in postgresql.conf. Monitor your server log for more info.

> Sometimes there are 54 or more established connection to the same server,
> while the software uses only 13. I think many of them must be dead but
> kept
> alive connections. How long the Windows keeps these inactive connections
> alive? How can I configure it?

The server will keep a connection open as long as the connection is maintained by the client. Killing the process that owns the connection is a guaranteed way to close them. Unfortunately, in a threaded app killing the thread is not enough to guarantee closure of the connection owned by the thread (unless it is the last thread, then the process will terminate).

As far as I know, it is not possible to configure postgres to kill connections that have not been used for a while but it is not all that difficult to rig up a procedure that could do it (if you are keeping statistics).

In these types of cases it is hard to determine if some of your problems are not on your end...maybe a better description of your problem (language, requirements, etc.) are in order.

Merlin

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Együd Csaba 2005-01-19 07:22:21 Re: psqlodbc 08.00.0004 - questions
Previous Message Együd Csaba 2005-01-18 20:49:23 psqlodbc 08.00.0004 - questions