IBM Support

DB2 : Slow connections to database server from remote applications ? Problem with DNS lookup.

Technical Blog Post


Abstract

DB2 : Slow connections to database server from remote applications ? Problem with DNS lookup.

Body


Recently we saw a problem where customer was having a delay in connection to the database through SAP (R3trans).

 

Sharing the list of steps we took to isolate(narrow down) the problem area, find the root cause and fix it.


In a setup involving many products and locations, trying to isolate the area of the problem is the best approach to avoid spending time in checking unrelated components.

 

Some primary checks to help isolate this case :

Got following information :

1> Problem was originally seen with the connection from the application server, and later while connecting through SAP (R3trans).

2> Local connection to DB2 server using command prompt was quick.

3> Remote connection from (remote) command prompt was slow as well.

 

Inference : So the slow connection issue was for all remote connections.

From experience we know that, most times if a slowness is detected for remote connections, it is related to some system(OS) issues in accessing host by name or authentication slow etc.

 


Next, check all remote connection related components :

1> Check if there is a delay in opening /etc/hosts.
In most cases, this is the problem. Have this looked into and fixed by your system admin.

Not in our case.

2> Check if the DNS lookup is slow.

check the following :
- DNS server configuration file.
- Check that the config values are same and in sync in all files below :
/etc/resolv.conf
/etc/resolv.dnsmasq
/etc/nsswitch.conf
/etc/hosts

In our case, issue was caused by an old DNS domain which was decommissioned and was still in the NFS server list.

After removing that DNS entry, connections to database from application (SAP-R3trans) were very fast.

3> Lastly check for network problems like congestion's, lags etc. in connections.


Also it is always recommended to check for any APAR's in DB2 matching the case :
Fix List for DB2 Version 10.5 for Linux, UNIX and Windows
/support/pages/node/488847


If it is still unresolved, collect the following data and involve DB2 Support :

db2fodc -hang full

This will run for  some time.  If it runs for more than 30 mins please terminate it.
And, then collect a new db2support  which will  collect the fodc  data  collected earlier :

db2support <output dir> -d <database_name> -c -s


Hope this helps !

 

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11140430