On 15 February 2011 13:06, Oleg Kalnichevski <[email protected]> wrote: > On Tue, 2011-02-15 at 14:53 +0200, Maxim Veksler wrote: >> On Tue, Feb 15, 2011 at 2:44 PM, Ryan Smith <[email protected]> >> wrote: >> > ms = 0.2 seconds. If youre making calls over the internet, you might >> > want to try a timeout of 15000ms (15 seconds). >> > I sometimes set it to 60000ms b/c the internet can lag at times. >> > >> > I would just set your timeout to 15000ms for testing and see if youre still >> > getting the same problems. >> >> Hi Ryan, >> >> I will be calling internally, inside EC2 farm. >> > > Well, I finally spotted an obvious problem with your code, which I > should have found earlier: HttpRequest objects are NOT thread-safe. They > may not be used by multiple threads.
Just had a thought - how about adding some code to detect such misuse? One might be able to do this using assertions, which can be enabled at run-time. Not sure how easy it would be - and it would be tedious to do it for all unsafe objects - but some are more likely to be shared. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
