I've pretty much always experienced timeouts when loading documents with a Stream. To get around this I try to stream for the shortest time possible so essentially load everything into memory then iterate over the list (I realise this isn't optimal but it was just a workaround and we don't / didn't have enough data to make it worth worrying about).
However I'm now getting timeouts even doing this. It's my understanding that you should be able to Stream forever so what can I do to enable this?
By timeout I mean a WebException with message "The operation has timed out".
at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset, Int32 count)
at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at Raven.Imports.Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 charsRequired) in c:\Builds\RavenDB-Stable-2.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonTextReader.cs:line 324
at Raven.Imports.Newtonsoft.Json.JsonTextReader.ParseValue() in c:\Builds\RavenDB-Stable-2.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonTextReader.cs:line 1001
at Raven.Imports.Newtonsoft.Json.JsonTextReader.ReadInternal() in c:\Builds\RavenDB-Stable-2.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonTextReader.cs:line 476
at Raven.Imports.Newtonsoft.Json.JsonTextReader.Read() in c:\Builds\RavenDB-Stable-2.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\JsonTextReader.cs:line 397
at Raven.Client.Connection.ServerClient.<YieldStreamResults>d__6b.MoveNext() in c:\Builds\RavenDB-Stable-2.5\Raven.Client.Lightweight\Connection\ServerClient.cs:line 1226
at Raven.Client.Document.DocumentSession.<YieldQuery>d__c`1.MoveNext() in c:\Builds\RavenDB-Stable-2.5\Raven.Client.Lightweight\Document\DocumentSession.cs:line 605
at Marketplace.Catalogue.ResourceBooking.PurgeOldSlotsTask.RemoveOldAvailability() in c:\Repositories\Marketplace\src\Marketplace.Catalogue\ResourceBooking\PurgeOldSlotsTask.cs:line 79
at Marketplace.Catalogue.ResourceBooking.PurgeOldSlotsTask.Process() in c:\Repositories\Marketplace\src\Marketplace.Catalogue\ResourceBooking\PurgeOldSlotsTask.cs:line 38
at Marketplace.Tasks.Program.Main(String[] args) in c:\Repositories\MarketplaceDeploy\src\Marketplace.Tasks\Program.cs:line 117
I'm using build 2952, hosted in IIS.