Correct. you probably want to change the defaults

System.Net.ServicePointManager.DefaultConnectionLimit = 4;


On 6 April 2013 00:12, Sayed Arian Kooshesh <koosh...@gmail.com> wrote:

> sounds like a problem with servicepointmanager. IT limits your connections
> to a site to 2 and can cause a limitation in your connections. You might
> want to look into it.. just a fly by guess.
>
>
> http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.aspx
>
>
> On Fri, Apr 5, 2013 at 3:42 PM, Stephan Steiner <stephan.stei...@gmail.com
> > wrote:
>
>> Hi
>>
>> I'm using long polling in my app and I recently noted something funny - it
>> seems there quite a low threshold for how long the server may take to
>> respond. It generally tends to work just fine with a 10 minute timeout,
>> but
>> recently more and more the server side timeout runs out so the server
>> responds, but nothing ever gets to the client until the client side
>> connection times out. The sessions will last longer if while a long poll
>> is
>> running, another connection is established to the server (those
>> connections
>> are short lived).
>>
>> Looking at wireshark, I see that my client immediately after making the
>> httpwebrequest sends an empty packet with FIN, ACK flags to the server
>> (two
>> packets pretty much concurrently), then another one a bit over a minute
>> later. At that time, if the server responds, data still gets to the
>> client,
>> but a certain time later, nothing goes anymore (I don't even see a single
>> tcp packet going from server to my client). I'm unable to give a precise
>> interval for when this happens - I thought it may be around the 4 minute
>> mark, but I've just had a case where 4.5 minutes after starting the
>> request
>> the server responded and the connection still worked. I have my clients
>> configured so they adapt the interval according to what's configured in
>> server, so I suppose if I set 1 Minute I'd be golden, but it's not very
>> effective both from a traffic standpoint and a power standpoint.
>>
>> So I'm wondering what others that use long polls have experienced in that
>> regard - do you have a reliable cutoff time to which you can adapt your
>> long
>> poll interval? Note that currently I'm using WiFi.
>>
>> I'm also using the exact same code compiled on a PC with much higher
>> intervals just fine - so it must be Android specific.
>>
>> Regards
>> Stephan
>>
>>
>>
>> --
>> View this message in context:
>> http://mono-for-android.1047100.n5.nabble.com/long-polling-connection-timeouts-tp5713110.html
>> Sent from the Mono for Android mailing list archive at Nabble.com.
>> _______________________________________________
>> Monodroid mailing list
>> Monodroid@lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>
>
>
> --
> Extreme Knowledge is not something for which he programs a computer but
> for which his computer is programming him.
>
> -Wozniak
>
>
>    - if my programming advice has helped you, feel free to donate to : 
> <https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>
>
> <https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>
> <https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>


-- 
Gonçalo Oliveira
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to