pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
60 Seconds to connected to Postgresql using ODBC or PGAdmin
10+ messages / 7 participants
[nested] [flat]

* 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 06:51  Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 2 replies; 10+ messages in thread

From: Richard Broersma Jr @ 2007-11-29 06:51 UTC (permalink / raw)
  To: Finn Lassen <dcio@AxiomInt.com>; +Cc: pgsql-odbc; General PostgreSQL List <pgsql-general@postgresql.org>

--- On Wed, 11/28/07, Finn Lassen <dcio@AxiomInt.com> wrote:

Can anyone else comment on what problems could be causing these slow connections problems?


> Meanwhile, I don't understand why it now takes exactly
> 60 seconds to connect to the database whether I use pgAdmin or my
> connection string from within VB.

This is very odd.  Since you are having a problem with your connection time on both pgAdmin(which doesn't use ODBC to connect) and ODBC connects, I would assume that you must be having an issue that is non-odbc related.  

> I thought I had seen a comment about this somewhere, but can't find it 
> now. I've tried changing Connection Pooling in the OBDC Data Source 
> Administrator for the PostgreSQL ANSI driver, but doesn't have any 
> effect (or maybe just reloading the server configuration is not enough?

If this were an ODBC connection Issue, i would first make sure that all of ODBC logging was disabled on your client computer.  ODBC logging can really kill performance.

The windows ODBC tracing is found in the ODBC Datasource Administrator form -> tracing -> [Stop tracing now] & [Stop Visual Studio Analyzer now].

I guess it is impossible for postgresql ODBC logging to be taking place since you using a DNSless connection and have set any parameters to start the logging.

If all of the logging is already off, try turning turning on the Myloging and CommLogin by setting the appropriate setting in your DNS-less connection string.  If you post these logs, It will help others on the ODBC mailing list to trouble shoot where your problem is coming from.

Also on a side note, it is important to remember that many of the subscribers to the Postgresql mailing list are bombarded with countless emails on a daily basis.  

Do to the voluminous amount of emails, I am pretty sure that most subscribers pick and choose which emails they will read purely based on the interest generated by the email's subject heading.  

So to help encourage more subscribes to participate, it is important to make your subject headings very specific (to the point) and to make them as eye catching as possible.  You'll notice that I've alter your email subject a bit.  Hopefully it will help get a few more people to join in on this thread.

There is nothing wrong with tackling a very difficult but general problem with postgresql by sending seperate emails with different subject heading the specifically address only the individual facets of the overall problem.  Different people will probably respond to different facets of your overall problem.

Regarding the test case I sent to you, how many columns should I try to create in a table in order to reproduce the problem you where having with needing OIDs created in your tables?

Regards,
Richard Broersma Jr.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 07:08  Adam M <gnuman1@gmail.com>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  1 sibling, 1 reply; 10+ messages in thread

From: Adam M @ 2007-11-29 07:08 UTC (permalink / raw)
  To: ; +Cc: pgsql-odbc

On Nov 29, 2007 12:51 AM, Richard Broersma Jr <rabroersma@yahoo.com> wrote:
> --- On Wed, 11/28/07, Finn Lassen <dcio@AxiomInt.com> wrote:
>
> Can anyone else comment on what problems could be causing these slow connections problems?
>
>
> > Meanwhile, I don't understand why it now takes exactly
> > 60 seconds to connect to the database whether I use pgAdmin or my
> > connection string from within VB.
>
> This is very odd.  Since you are having a problem with your connection time on both pgAdmin(which doesn't use ODBC to connect) and ODBC connects, I would assume that you must be having an issue that is non-odbc related.

60 seconds lag that happens all the time is generally a DNS issue.
Whenever a connection takes that long of a time, and the server is not
loaded like crazy, then it is most likely a reverse DNS issue.
Sometimes a forward DNS issue. The delay is just the amount of time
for the DNS lookup to timeout.

- Adam



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 07:13  Richard Broersma Jr <rabroersma@yahoo.com>
  parent: Adam M <gnuman1@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Richard Broersma Jr @ 2007-11-29 07:13 UTC (permalink / raw)
  To: Adam M <gnuman1@gmail.com>; +Cc: pgsql-odbc

--- On Wed, 11/28/07, Adam M <gnuman1@gmail.com> wrote:
> Whenever a connection takes that long of a time, and the
> server is not
> loaded like crazy, then it is most likely a reverse DNS
> issue.
> Sometimes a forward DNS issue. The delay is just the amount
> of time
> for the DNS lookup to timeout.

In this case, the OP's servers is localhost.  Would this indicate the DNS (foward|reverse) issue?

Regards,
Richard Broersma Jr.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 07:38  Richard Huxton <dev@archonet.com>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  1 sibling, 1 reply; 10+ messages in thread

From: Richard Huxton @ 2007-11-29 07:38 UTC (permalink / raw)
  To: Richard Broersma Jr <rabroersma@yahoo.com>; +Cc: Finn Lassen <dcio@AxiomInt.com>; pgsql-odbc; General PostgreSQL List <pgsql-general@postgresql.org>

Richard Broersma Jr wrote:
> --- On Wed, 11/28/07, Finn Lassen <dcio@AxiomInt.com> wrote:
> 
> Can anyone else comment on what problems could be causing these slow connections problems?
> 
> 
>> Meanwhile, I don't understand why it now takes exactly
>> 60 seconds to connect to the database whether I use pgAdmin or my
>> connection string from within VB.

Name lookups. Something is trying to look up a name, failing and it's 
timing out after 60 seconds.

Could be DNS, or WINS (or whatever MS' current name resolution system is 
called). It could be either end of the connection too, if for example 
something on the server is logging the names of connecting clients.

Try a couple of name lookups (forward and reverse) from each end and see 
what happens.

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 07:54  Richard Broersma Jr <rabroersma@yahoo.com>
  parent: Richard Huxton <dev@archonet.com>
  0 siblings, 3 replies; 10+ messages in thread

From: Richard Broersma Jr @ 2007-11-29 07:54 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: Finn Lassen <dcio@AxiomInt.com>; General PostgreSQL List <pgsql-general@postgresql.org>

--- On Wed, 11/28/07, Richard Huxton <dev@archonet.com> wrote:
> Name lookups. Something is trying to look up a name,
> failing and it's 
> timing out after 60 seconds.

It seems the OP's connection string was set to localhost.  Would this still indicate a Name Loopup problem?

Regards,
Richard



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 07:57  Peter <peterpub1@aboutsupport.com>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  2 siblings, 0 replies; 10+ messages in thread

From: Peter @ 2007-11-29 07:57 UTC (permalink / raw)
  To: General PostgreSQL List <pgsql-general@postgresql.org>

Richard Broersma Jr wrote:

> It seems the OP's connection string was set to localhost.  Would this still indicate a Name Loopup problem?
> 

Do you have some some firewall running ? Also is there a localhost entry 
in your hosts file(e.g /etc/hosts or C:/windows/system32/drivers/etc) ?

Peter




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 08:07  Richard Huxton <dev@archonet.com>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  2 siblings, 0 replies; 10+ messages in thread

From: Richard Huxton @ 2007-11-29 08:07 UTC (permalink / raw)
  To: Richard Broersma Jr <rabroersma@yahoo.com>; +Cc: Finn Lassen <dcio@AxiomInt.com>; General PostgreSQL List <pgsql-general@postgresql.org>

Richard Broersma Jr wrote:
> --- On Wed, 11/28/07, Richard Huxton <dev@archonet.com> wrote:
>> Name lookups. Something is trying to look up a name, failing and
>> it's timing out after 60 seconds.
> 
> It seems the OP's connection string was set to localhost.  Would this
> still indicate a Name Loopup problem?

That would make it unlikely.

The only other option that occurs to me would be some firewall type of 
package that's taking a long time to allow a connection. It would be an 
odd bit of security software that timed out and then *allowed* the 
connection to proceed.

Hmm - it looks like the wireshark network sniffer is available for 
Windows (http://www.wireshark.org/) - I'd be tempted to install that and 
connect to an external IP and see what packets go where. That will save 
a lot of head-scratching.

-- 
   Richard Huxton
   Archonet Ltd



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 08:23  Shane Ambler <pgsql@Sheeky.Biz>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  2 siblings, 1 reply; 10+ messages in thread

From: Shane Ambler @ 2007-11-29 08:23 UTC (permalink / raw)
  To: Richard Broersma Jr <rabroersma@yahoo.com>; +Cc: Richard Huxton <dev@archonet.com>; Finn Lassen <dcio@AxiomInt.com>; General PostgreSQL List <pgsql-general@postgresql.org>

Richard Broersma Jr wrote:
> --- On Wed, 11/28/07, Richard Huxton <dev@archonet.com> wrote:
>> Name lookups. Something is trying to look up a name,
>> failing and it's 
>> timing out after 60 seconds.
> 
> It seems the OP's connection string was set to localhost.  Would this still indicate a Name Loopup problem?
> 

If there is no entry (or an incorrect one) in /etc/hosts for localhost - 
then yes - try to connect to 127.0.0.1 and see if that makes a difference.

Also if it is set to do namelookup before referring to /etc/hosts it can 
have similar probs.


-- 

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 09:01  Paul Lambert <paul.lambert@reynolds.com.au>
  parent: Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Paul Lambert @ 2007-11-29 09:01 UTC (permalink / raw)
  To: pgsql-odbc

Richard Broersma Jr wrote:
> In this case, the OP's servers is localhost.  Would this indicate the DNS (foward|reverse) issue?
> 
> Regards,
> Richard Broersma Jr.
> 

I'd suggest that indicates something else going on the system - a 
firewall, proxy, virus scanner that's intercepting the connection and 
taking a while to let it through.

I have a similar problem with Trend Internet Security on my laptop - it 
has a proxy service built in which will occasionally make my web 
browser, email client and other outgoing connection attempts (incl. 
sometimes PGAdminIII) take an excessive amount of time before they get 
through.

It would perhaps be worthwhile running something like WireShark to see 
what network activity is taking place.

-- 
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: 60 Seconds to connected to Postgresql using ODBC or PGAdmin
@ 2007-11-29 12:34  Usama Dar <munir.usama@gmail.com>
  parent: Shane Ambler <pgsql@Sheeky.Biz>
  0 siblings, 0 replies; 10+ messages in thread

From: Usama Dar @ 2007-11-29 12:34 UTC (permalink / raw)
  To: Shane Ambler <pgsql@sheeky.biz>; +Cc: Richard Broersma Jr <rabroersma@yahoo.com>; Richard Huxton <dev@archonet.com>; Finn Lassen <dcio@axiomint.com>; General PostgreSQL List <pgsql-general@postgresql.org>

Or you can try using a simple packet sniffer, maybe ,ethereal , to see if
name resolution is going on, i had similar problems with MySQL name
resolution in the past and they generally went away after disabling its name
resolution and just use IPs

On Nov 29, 2007 1:23 PM, Shane Ambler <pgsql@sheeky.biz> wrote:

> Richard Broersma Jr wrote:
> > --- On Wed, 11/28/07, Richard Huxton <dev@archonet.com> wrote:
> >> Name lookups. Something is trying to look up a name,
> >> failing and it's
> >> timing out after 60 seconds.
> >
> > It seems the OP's connection string was set to localhost.  Would this
> still indicate a Name Loopup problem?
> >
>
> If there is no entry (or an incorrect one) in /etc/hosts for localhost -
> then yes - try to connect to 127.0.0.1 and see if that makes a difference.
>
> Also if it is set to do namelookup before referring to /etc/hosts it can
> have similar probs.
>
>
> --
>
> Shane Ambler
> pgSQL@Sheeky.Biz
>
> Get Sheeky @ http://Sheeky.Biz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2007-11-29 12:34 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 06:51 60 Seconds to connected to Postgresql using ODBC or PGAdmin Richard Broersma Jr <rabroersma@yahoo.com>
2007-11-29 07:08 ` Adam M <gnuman1@gmail.com>
2007-11-29 07:13   ` Richard Broersma Jr <rabroersma@yahoo.com>
2007-11-29 09:01     ` Paul Lambert <paul.lambert@reynolds.com.au>
2007-11-29 07:38 ` Richard Huxton <dev@archonet.com>
2007-11-29 07:54   ` Richard Broersma Jr <rabroersma@yahoo.com>
2007-11-29 07:57     ` Peter <peterpub1@aboutsupport.com>
2007-11-29 08:07     ` Richard Huxton <dev@archonet.com>
2007-11-29 08:23     ` Shane Ambler <pgsql@Sheeky.Biz>
2007-11-29 12:34       ` Usama Dar <munir.usama@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox