On Jun 20, 2012, at 10:39 AM, klimaye wrote: ... > We started using .net 4.0's inputStream.CopyTo(outputStream) instead of doing > the stream copy ourselves via code. > > Since then we have been experiencing this 'Timeout error' intermittently. ... > To narrow down the problem, we have performed some tests (per 12 MB file size > copy operation using streams) on different devices with the following results: > > • Samsung Galaxy S running Froyo 2.2 – No problems (tested 5 times in a > row) > • Vizio VTAB1008 running Honeycomb 3.1 – No problems (tested 10 times in > a row) > • Samsung Galaxy S 4G running Gingerbread 2.3.3 – No Problems (tested 3 > times in a row) > • Samsung Galaxy Tab 7 running Honeycomb 3.2 – No Problems (tested 5 > times in a row) > • Samsung Galaxy S II running ICS 4.0.3 - FAILED > • Acer Iconia A500 running Homeycomb 3.1 – No Problem (10 times) > • Acer Iconia A500 running ICS 4.0.31 – FAILED
We're not sure why you're seeing this, but we have a couple of things to try. Stream.CopyTo(Stream) defaults to using a 16KB buffer size. Perhaps this is too large for ICS? Try using the Stream.CopyTo(Stream, int) overload and use a buffer size of 1KB or 4KB. If you're using HttpWebRequest, you might also try ensuring that you dispose of the HttpWebResponse stream: https://bugzilla.novell.com/show_bug.cgi?id=648862#c9 and setting HttpWebRequest.KeepAlive to false: https://bugzilla.novell.com/show_bug.cgi?id=648862#c12 Thanks, - Jon _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid