Обсуждение: Losing Connections

Поиск
Список
Период
Сортировка

Losing Connections

От
Pablo Velasquez Rivas
Дата:

Hi.

I have an application using psql 7.3.3 and pg73b1jdbc3.jar for connections with PostgreSQL.

When an user is idle for a while (like an hour) and then try to insert or update something in the database, the user gets an error message. I don't have right now the message, but it is something with the connection with the database.

I already asked at the postgresql forum, but the say that pgsql does not drop connections. So, my question is if the jdbc driver for some reason drop the connections.

Or maybe  a firewall  is dropping the connections.

Does anybody know what could be the problem??

Thanks for any help.  

==                                 ==
   Pablo A. Velasquez Rivas
Computer Science Engineer
==                                 ==

Re: Losing Connections

От
Nicolas Modrzyk
Дата:
Hi Pablo,

If you use a C-JDBC driver on top of the Postgresql driver it checks for
dropped connection using test statements when a request has failed.
You can see more there:
http://c-jdbc.objectweb.org/current/doc/userGuide/html/userGuide.html#dtd_databasebackend

Hope this can help you.

Nicolas Modrzyk,

Pablo Velasquez Rivas wrote:

> Hi.
>
> I have an application using psql 7.3.3 and pg73b1jdbc3.jar for
> connections with PostgreSQL.
>
> When an user is idle for a while (like an hour) and then try to insert
> or update something in the database, the user gets an error message. I
> don't have right now the message, but it is something with the
> connection with the database.
>
> I already asked at the postgresql forum, but the say that pgsql does
> not drop connections. So, my question is if the jdbc driver for some
> reason drop the connections.
>
> Or maybe  a firewall  is dropping the connections.
>
> Does anybody know what could be the problem??
>
> Thanks for any help.
>
>
> ==                                 ==
>    Pablo A. Velasquez Rivas
> Computer Science Engineer
> ==                                 ==



Re: Losing Connections

От
Dave Cramer
Дата:
if you have a firewall then look there

Dave
On Tue, 2004-02-24 at 09:19, Pablo Velasquez Rivas wrote:
> Hi.
>
> I have an application using psql 7.3.3 and pg73b1jdbc3.jar for
> connections with PostgreSQL.
>
> When an user is idle for a while (like an hour) and then try to insert
> or update something in the database, the user gets an error message. I
> don't have right now the message, but it is something with the
> connection with the database.
>
> I already asked at the postgresql forum, but the say that pgsql does
> not drop connections. So, my question is if the jdbc driver for some
> reason drop the connections.
>
> Or maybe  a firewall  is dropping the connections.
>
>
> Does anybody know what could be the problem??
>
>
> Thanks for any help.
>
>
> ==                                 ==
>    Pablo A. Velasquez Rivas
> Computer Science Engineer
> ==                                 ==
--
Dave Cramer
519 939 0336
ICQ # 14675561


Re: Losing Connections

От
Paul Thomas
Дата:
On 24/02/2004 14:19 Pablo Velasquez Rivas wrote:
> Hi.
>
> I have an application using psql 7.3.3 and pg73b1jdbc3.jar for
> connections with PostgreSQL.
>
> When an user is idle for a while (like an hour) and then try to insert
> or update something in the database, the user gets an error message. I
> don't have right now the message, but it is something with the
> connection with the database.
>
> I already asked at the postgresql forum, but the say that pgsql does not
> drop connections. So, my question is if the jdbc driver for some reason
> drop the connections.
>
> Or maybe  a firewall  is dropping the connections.
>
> Does anybody know what could be the problem??

The firewall sounds like the most likely source of the problem.


--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

Re: Losing Connections

От
Tom Lane
Дата:
Pablo Velasquez Rivas <pvelasquez@its.co.cr> writes:
> Or maybe  a firewall  is dropping the connections.

If the connection is passing through a firewall that does address
translations (NAT), then this is a very likely possibility.  The
firewall may drop its table entry for the connection address mapping
after some idle time.

            regards, tom lane