Wednesday, August 19, 2009

Slow network connection in 11g

Today I found a thread on Oracle forum about a slow connection and I recall that I solved it in past.
Now I have found a few notes on Metalink (ex. 803838.1) which confirm my investigation that Oracle 11g is using DNS to resolve names instead of /etc/hosts file on Unix box. If your server is not registered in DNS or if there is no DNS server which was specified in /etc/resolv.conf you can have a connection problem.

A fastest way to solve it on Linux is to remove "nameserver" entry from /etc/resolv.conf file if you don't need a DNS on the server otherwise you have to be sure that your Oracle server is registered in DNS.

On Solaris a solution is a little bit different - change line in /etc/nsswitch.conf into

ipnodes: files [NOTFOUND=continue] dns

and do not delete line starting with hosts.

regards,
Marcin

9 comments:

Peter said...

Hi,

Why wouldnt you just change /etc/nsswitch.conf to look at the hosts-file first on Linux also?

regards
/Peter

Marcin Przepiorowski said...

Peter,

True you can, but when I did it in /etc/host.conf and in /etc/nsswitch.conf it didn't work for me. I have to solve problem quickly so I just remove nameserver entry.

regards,
Marcin

Anonymous said...

Hi,
Thank you for your post. Can you elaborate on how DNS problem can make the connection slow, do you mean the server is unreachable? Also are you aware about the same problem on 10g could it be the same reason ?

Marcin Przepiorowski said...

This is connection time only problem - Oracle server is trying to reverse a client IP into name.
If you have that problems in 10g - check what is a order of resolving name into IP. If you can write me more about our problem I can try to help.

regards,
Marcin

Dominik said...

Thanks for your post, it really helped making oracle faster!

Unknown said...

Thank you for your post. ... Helped me resolve the same issue at my company.

Anonymous said...

Would you know if this also applies to AIX systems?

Marcin Przepiorowski said...

Never looking for that kind of issues on AIX - but in my opinion it is Oracle related issue so can occur on AIX as well . What version of Oracle are you using ?

King Michael said...

Marcin,

I ahve this in nsswitch.conf

ipnodes: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

Is that the same as yours?

We are experiencing slow connections when we bing up our app. Please advise.

Thanks,
Mike Calderon