Обсуждение: Slow Connection
Dear all, I develop application using Delphi and Postgres (use Winzeos component to connect to postgres). But I have problem, when I run application at first time, I wait about 1 minute to see the application. I think this happen because my application to connect to postgres too slow. What I must do to reduce speed connection between my application to postgres ? FYI, my server use Linux RH 7.1, Postgres 7.0.2, CPU Cyrix M-II 300, RAM 32 MB, NIC Realtek 8029 my client use Win98, CPU P200MMX, RAM 49 MB, and delphi 5 for develop app. regards, Achmad MA __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
<tt>Achmad Amin schrieb:</tt><blockquote type="CITE"><tt>Dear all,</tt><br /><tt>I develop application using Delphi and Postgres(use</tt><br /><tt>Winzeos component to connect to postgres). But I have</tt><br /><tt>problem, when I run applicationat first time, I wait</tt><br /><tt>about 1 minute to see the application. I think this</tt><br /><tt>happen becausemy application to connect to postgres</tt><br /><tt>too slow. What I must do to reduce speed connection</tt></blockquote><tt> ^^^^^^^^^^^^^ you mean increase?</tt><blockquote type="CITE"><tt>betweenmy application to postgres ?</tt></blockquote><tt>Well, often this behavior can result from a timedout</tt><br /><tt>name lookup (I assume you don't really have an official</tt><br /><tt>name for your client :-) Tocheck this, try to 'telnet'</tt><br /><tt>to your server before you do anything else (so you will</tt><br /><tt>have thesame situation). If this takes more than just</tt><br /><tt>one or two seconds - but succeeds after a while, perhaps</tt><br/><tt>the one minute delay you mentioned - then it probably is</tt><br /><tt>the name lookup. In this caseyou should add the IP address</tt><br /><tt>of your Win98 box and a name to either your '/etc/hosts' or</tt><br /><tt>yournamed data base (probably in /var/named).</tt><p><tt>If telnet just works fast then try to do a select statement</tt><br/><tt>using 'psql'. Does this one take the that long? Can you</tt><br /><tt>afterwards connect fast fromyour Windoze-Box? Then</tt><br /><tt>it probably is the size of your database in relation to your</tt><br /><tt>memory... 32MB is not much for a database server if you</tt><br /><tt>want to handle a huge amount of data. This wouldbe accompanied</tt><br /><tt>by havy disk activity. Perhaps you can shut down your X</tt><br /><tt>environment - ifyou have it running.</tt><p><tt>Hope this helps</tt><p><tt>Andreas</tt>
> Well, often this behavior can result from a timed > out > name lookup (I assume you don't really have an > official > name for your client :-) To check this, try to > 'telnet' > to your server before you do anything else (so you > will > have the same situation). If this takes more than > just > one or two seconds - but succeeds after a while, > perhaps > the one minute delay you mentioned - then it > probably is > the name lookup. In this case you should add the IP > address > of your Win98 box and a name to either your > '/etc/hosts' or > your named data base (probably in /var/named). > I already did that, and telnet works fine. Yesterday, I try to trace, then i found my problem, but I can resolve it :( My problem is when app. send query (ZPgSqlQuery component) to server or when i try to set ZPgSqlQuery properties active = true, it take much time. __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com
Andreas Kretzer schrieb: > > Achmad Amin schrieb: > > > Dear all, > > I develop application using Delphi and Postgres (use > > Winzeos component to connect to postgres). But I have > > problem, when I run application at first time, I wait > > about 1 minute to see the application. I think this > > happen because my application to connect to postgres > > too slow. What I must do to reduce speed connection > > ^^^^^^^^^^^^^ you mean increase? > > > between my application to postgres ? > > Well, often this behavior can result from a timed out > name lookup (I assume you don't really have an official > name for your client :-) To check this, try to 'telnet' > to your server before you do anything else (so you will > have the same situation). If this takes more than just > one or two seconds - but succeeds after a while, perhaps > the one minute delay you mentioned - then it probably is > the name lookup. Even if the name lookup works ... it may be the reverse name lookup .... try to use nslookup <ip-number> to find it out. Marten