Subscribe via Feed

XPages Server Bug You Might Not Know About, But May Have Already Bit You.

Jeremy Hodge, Aug 24, 2010 7:07:55 PM

Ok, so this is an interesting tip.  Some of you may have read my last post on my blog about a serious delay issue I've been having with an XPage application. Through some hard work with Nathan T Freeman (Mr NTF himself) and the XPages Team at IBM, namely Philippe Riand, Mike Kerrigan and more, we've discovered a bit of an interesting issue.

The problem lies in DNS name resolution on your server. XPages uses "server" as a server name for some internal URLs to access resources within the NSF. We found that the server may try to resolve this name using DNS. If your server has a DNS server that is reachable, and fast, and your computer is not set to automatically append your domain to a DNS query, then the lookup fails immediately (usually within 0 milliseconds), and life is hunky dorey.

HOWEVER, if your DNS server is unreachable, or your client is set to automatically append your domain, such as ".zetaone.com" the query becomes "server.zetaone.com" and if either of these conditions lead to a delay in DNS resolution for the lookup, that delay is added directly to the initialization time of your application.

Whatever time your query takes, say 500ms to resolve, then that adds a 1/2 second delay to your application's initialization time.  If your DNS servers are unreachable, or have problems resolving the name, this can add precious time to your application's load time. On Windows servers, the default time out is 2 seconds per DNS server your server is set to query, and on *NIX platforms (Unix, Linux), its usually 10 seconds by default.

Now, this only affects your user the first time they open an application within a session, after that further tries within the same application the lookup is cached. But, if the user opens another aplication (different database) then they will experience the delay all over again.

A fix is in the works for 8.5.2 FP1 (hopefully) to resolve the issue, but in the mean time, to resolve/prevent the problem, the best thing to do is to add two lines to your hosts file that resolve to 127.0.0.1, like this:

server.                                127.0.0.1
server.yourdomain.tld.       127.0.0.1

You can find out if you are experiencing this delay by doing an nslookup/dig for "server." and "server.yourdomain.tld." on your domino server. Whatever the response times for those queries are, you can potentially subtract them from your load time with the above fix.



5 responses to XPages Server Bug You Might Not Know About, But May Have Already Bit You.

Jeremy Hodge, August 24, 2010 8:33 PM

Add the following to your server's notes.ini

DEBUG_THREADID=1
DEBUG_CAPTURE_TIMEOUT=1
DEBUG_SHOW_TIMEOUT=1
HTTPEnableThreadDebug=1

Then in the IBM_TECHNICAL_SUPPORT folder, you get files matching the "htthr_processid_threadid_YYYYMMDD@HHMMSS.log" filespec with which you can troubleshoot what is happening.

I also found

HTTPEnableResponseContentLogging=1
HTTPEnablePostDataLogging=1

to be helpful as well

Jeremy


Patrick Picard, August 24, 2010 8:19 PM

Hi Jeremy,
What are the HTTP debug switches you used to show the 15sec delay?

I want to debug an issue where it takes a while to display a login page on a websserver and returning back to the originating page..


Jeremy Hodge, August 24, 2010 8:07 PM

its specifically "server" ... not "replace server with your server's name" ... and the yourdomain.tld will be the domain that get appended to your queries via DNS, which in windows you can find out if that is happening if you run a command prompt, then type hostname, then type nslookup -insert_what_hostname_told_you_here-, for example:

c:\>hostname
myServer_dell
c:\>nslookup myServer_dell

If it returns myServer_dell.somedomain.com then your server is set to append somedomain.com to your queries, so add

server. 127.0.0.1
server.somedomain.com. 127.0.0.1

to your server's host file


Sean Cull, August 24, 2010 8:01 PM

Jeremey, thanks for this, It may be an issue for me.
for clarification if my server is acme01/srv/acme and is delivering content via acme.com do you really mean
server. 127.0.0.1
or do you mean
acme01. 127.0.0.1
i.e is it literally "server" or figuratively "server" if that makes sense
Thanks, Sean


Nathan T. Freeman, August 24, 2010 7:39 PM

Debugging network stack problems gives me brain lesions :( But it was worth it to learn about YourKit.