Recently I started getting .NET WebRequest "underlying connection was closed" errors while using dotNetRDF to query Stardog. I'd only see it when the SPARQL query was POST-ed to Stardog rather than GET-ed (gotten?). It pretty much only happened when connecting to a remote Stardog box (one not on the same server). The servers (both Windows and Linux) were at Azure, running the latest version of Stardog. The kicker was that if I ran through a proxy, like Fiddler, it'd work! Making it hard to debug. FWIW the problem started hitting me hard shortly after upgrading to 2.2.2 but I got it intermittently in earlier versions. I'm not really convinced it has anything to do with 2.2.2.
After a lot of drinking I found
this and turned off Keep Alive and switched from HTTP 1.1 to 1.0 and it fixed the problem.
Any ideas why this would be the case? And would permanently turning off Keep Alive and using HTTP 1.0 cause any new problems?
- Ron