title: Android communication to server very slow due to long DNS packets
body: <p>I am working on a project that communicates to a server through a URLConnection.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>URL theSite;
  theSite = new URL(TestURL);
  URLConnection con = theSite.openConnection();
  
  BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
  </code></pre>
  
  <p>However this is taking my Motorola Atrix and Samsung Nexus S about 20 seconds or more to when talking with the server. (Information does get sent eventually it seams) Looking at the packets in wireshark,  I've found that there are many groups of DNS packets sent which with about 3-5 seconds between each one. This is likely the cause of the slow communication.</p>
  
  <p>Here is are two sample DNS packets. (I've changed the IP's, except for the destination of 8.8.8.8 which I believe is google)</p>
  
  <pre><code>Time         Source    Destination  Protocol   Info
  20.308792 10.10.120.104  8.8.8.8    DNS       Standard query PTR 3.120.10.10.in-addr.arpa
  25.360726 10.10.120.104  8.8.8.8    DNS       Standard query PTR 3.120.10.10.in-addr.arpa
  </code></pre>
  
  <p>Anyways, this happened today out of the blue. But it is very apparent that it is these DNS calls that are causing slow communication between the server and my device. </p>
  
  <p>Another thing of note, is that I have also tried the EXACT same code on the Samsung Galaxy 10.1 tablet and it works fine. Looking at the packet trace there are no Extra DNS calls from the tablet. </p>
  
  <p>I don't have control over the server, and had the packets sent to me. Does anyone have any suggestions?  I'm guessing that it is a server related issue. If anyone has any ideas, it is much appreciated. </p>
  
  <p>Thanks!</p>