Thread: pgsql over ISDN lines ...

pgsql over ISDN lines ...

From
Marten Feldtmann
Date:
I've tried to use PostgreSQL over ISDN lines with about a timeout
of ~60 seconds - when no traffic is done, the line is dropped.

Actually I've done several tests under Linux with Adabas-D and
I was *very* surprised to see, that the application was working
with the database without any problems - even when the line
was dropped. No problem at all .. for the next query the
isdn line was build up again, the query was done and it hanged
up again after timeout ...

PostgreSQL seems to have *many* problems with it:

1) The system can not connect to the database, because of the time
   the isdn line needs to build up the connection.

2) After the line was dropped, the application was not able to
   use the connection to the database for further work.

What could be done against such behaviour ?


Marten




Re: [GENERAL] pgsql over ISDN lines ...

From
Peter Mount
Date:
On Tue, 25 Jan 2000, Marten Feldtmann wrote:

> I've tried to use PostgreSQL over ISDN lines with about a timeout
> of ~60 seconds - when no traffic is done, the line is dropped.
>
> Actually I've done several tests under Linux with Adabas-D and
> I was *very* surprised to see, that the application was working
> with the database without any problems - even when the line
> was dropped. No problem at all .. for the next query the
> isdn line was build up again, the query was done and it hanged
> up again after timeout ...
>
> PostgreSQL seems to have *many* problems with it:
>
> 1) The system can not connect to the database, because of the time
>    the isdn line needs to build up the connection.
>
> 2) After the line was dropped, the application was not able to
>    use the connection to the database for further work.
>
> What could be done against such behaviour ?

Hmmm, I've just tried this, and it worked for me.

I've got ISDN here, so I setup a test server on one of my linux boxes at
work, then dropped the line.

I then tested #1 buy connecting to the server. It connected fine.

I then issued a query, which worked, then dropped the ISDN connection
(with the psql one still running).

With the ISDN down, I then issued another query using psql, and the ISDN
line came up, and after a couple of seconds, the query results were
returned.

From the remote server:
template1=> select version();
version
-------------------------------------------------------------------
PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
(1 row)

And from the local server (the one I used psql from):
template1=> select version();
version
-------------------------------------------------------------------
PostgreSQL 6.6.0 on i586-pc-linux-gnu, compiled by gcc egcs-2.91.66
(1 row)


Peter

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Re: [GENERAL] pgsql over ISDN lines ...

From
Sevo Stille
Date:
Marten Feldtmann wrote:
>
> I've tried to use PostgreSQL over ISDN lines with about a timeout
> of ~60 seconds - when no traffic is done, the line is dropped.
...
> PostgreSQL seems to have *many* problems with it:
>
> 1) The system can not connect to the database, because of the time
>    the isdn line needs to build up the connection.

Unlikely. I've been using remote postgres databases over ISDN for years
- often with ssh port forwarding, to make matters worse, at least in
terms of reconnect times.

> 2) After the line was dropped, the application was not able to
>    use the connection to the database for further work.

Looks like some dialer or ppp problem to me. To be able to use
persistent connections across a ppp line, it has to maintain state even
if the modem or ISDN line drops - which usually means using static
addresses and may require bidirectional dialing.

> What could be done against such behaviour ?

It depends. If you can, fix your dialer. Otherwise, you may have to
change your application so that it does not maintain a persistent
connection to the database. Or, as a quick, but possibly expensive fix,
use something like ping -i 30 to the server to keep the connection up.

Sevo

--
Sevo Stille
sevo@ip23.net

Re: [GENERAL] pgsql over ISDN lines ...

From
Marten Feldtmann
Date:
> On Tue, 25 Jan 2000, Marten Feldtmann wrote:
>
> > I've tried to use PostgreSQL over ISDN lines with about a timeout
> > of ~60 seconds - when no traffic is done, the line is dropped.
> >
>
> Hmmm, I've just tried this, and it worked for me.
>
> I've got ISDN here, so I setup a test server on one of my linux boxes at
> work, then dropped the line.
>
> I then tested #1 buy connecting to the server. It connected fine.
>
> I then issued a query, which worked, then dropped the ISDN connection
> (with the psql one still running).
>
> With the ISDN down, I then issued another query using psql, and the ISDN
> line came up, and after a couple of seconds, the query results were
> returned.
>

 Ok, I've now done some further tests and I've found the reason, why
my application process was not able to continue ....

 The reason was, that the backend process terminated when the isdn
line went down.

 What have I done:

 telnet to remote server pc and start the postmaster.

 Now doing several sql-command using psql ...

 now do nothing, line is dropped ....

 now I try to execute some psql commands .. but they failed.

 telnet to server: postmaster is still running, but backend process is
not there ...



 Marten


 Any idea ?