Troubleshooting
Problem
A problem with DNS lookup can cause slow connection to database server. This article explains one scenario and a possible solution for that problem.
Symptom
Connection request to database server from dbaccess is trying to access DNS server for hostname resolution, after it found the same in the local host file.
On certain Operating System (for example: Linux) you may noticed dbaccess (and other client applications) always doing DNS lookup while connecting to a database, even after found out the hostname or IP address in the local host file. This behavior sometimes caused slow connection, if you have problem related to DNS. Following is an excerpt of strace output shows the sequence of file accessed by a dbaccess request:
$ strace dbaccess sysadmin -e | grep open
….
open("/etc/services", O_RDONLY) = 6
open("/etc/resolv.conf", O_RDONLY) = 6
open("/etc/host.conf", O_RDONLY) = 6
open("/etc/hosts", O_RDONLY) = 6
open("/etc/ld.so.cache", O_RDONLY) = 6
open("/lib64/libnss_dns.so.2", O_RDONLY) = 6
open("/lib64/libresolv.so.2", O_RDONLY) = 6
open("/etc/hosts", O_RDONLY) = 6
….
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21663287