[Gambas-user] Trouble connecting to postgres 8.0

Christopher Brian Jack brian at ...1334...
Fri Jan 27 18:58:06 CET 2006


On Fri, 27 Jan 2006, johnf wrote:

> Date: Fri, 27 Jan 2006 09:01:21 -0800
> From: johnf <jfabiani at ...1109...>
> Reply-To: gambas-user at lists.sourceforge.net
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] Trouble connecting to postgres 8.0
>
> On Friday 27 January 2006 00:41, johnf wrote:
> > Hi,
> > Just wondering if anyone is using postgres 8.0 with 1.9.23.  I'm having
> > trouble connecting.  I'm able to connect with other versions but can't for
> > some reason connect to version 8.0.  I don't think it has anything to do
> > with permissions because I can connect using psql as the same user.  I only
> > have the issue with gambas as far as I can tell.
> >
> > John
> I have mis spoke.  Gambas is connecting.  The issue is it loses the
> connection.  I traced this down and discovered I could make an exec call on
> the connection several times in a row and then suddenly lose the connection.
> I'm guessing there is some sort of trouble with postgres and NOT gambas.
> I'll re-install sometime today.  The funny thing is pgadminIII does not lose
> the connection or so I think.
>
> John

I'm wondering if maybe the connection is timing out? Try running a
concurrent form with a timer in it that beats in tenths of seconds (set
TimerObject.Delay=100) and display the value in a label.  Make a public
method ResetElapsed() (sets beatcount to zero and enables timerobject) you
can call immediately once connection is established and make another
public method StopTimer (that just sets timerobject disabled) and have it
called when you lose the connection.

If the connection dies at around the same elapsed beat count (within a few
tenths or so [of a second]) then chances are good the connection has a
maximum lifetime or there is a keepalive signal the native library is not
issuing to renew the database connection.

==================================================
Christopher BRIAN Jack aka "Gau of the Veldt"
==================================================
brian _AT_ brians-anime _DOT_ com
brian _AT_ animemayhem _DOT_ com
brian _AT_ nall _DOT brians-anime _DOT_ com
brian _AT_ ruby _DOT brians-anime _DOT_ com
gau_veldt _AT_ hotmail _DOT_ com
==================================================

-- Hi Spambots, my email address is sputnik at ...1334...




More information about the User mailing list