Cache the hostname. On some windows boxes the hostname doesn't seem to be cached or needs to do a name server lookup making this call block for 10-20 seconds. This will often cause the client to time out.