title: Web Service random timeout / dropping connections
body: <p>We have a windows client application that makes web service calls.  The web service can sometimes perform rather long queries on a database.  We have 3 production environments where this works fine.  However, on one of them we receive this error when performing those long running queries through the webservice.  The client sees;</p>
  
  <blockquote>
    <p>"The underlying connection was closed: An unexpected error occurred on a receive."</p>
  </blockquote>
  
  <p>This happens often, but does not generally happen when there are no users who are using the web service (i.e: when we test at night time). Only during the daytime when the web service is under load.</p>
  
  <p>If we turn ON the http-keepalives setting, the exact error still occurs, only the text is different.  It will say;</p>
  
  <blockquote>
    <p>"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."</p>
  </blockquote>
  
  <p>All timeouts seem to be ok (client web service proxy, web.config, IIS). Any info anyone could give with this would be much appriciated!</p>
  
  <p>The system runs SQL 2008 R2 Express on 64bit Windows server 2008 R2, and Microsoft .NET Framework 2.0.50727.4963</p>
  
  <p>The other systems that run without this issue are using 32bit Windows server 2003 R2,SQL 2008 Express (not R2) and Microsoft .NET Framework 2.0.50727.3053</p>