You will see this error under the following conditions:
1. The makerequest is using a POST
2. If it takes MySpace's proxy servers more than 2 seconds to *just* get the HTTP request stream to the 3rd party server so that we send the POST data to the 3rd party servers.If we can't get the request stream in 2 seconds we abort the request and send that error message to the client.
Please also note that we also have the following timeouts (for both GETs and POSTs):
ReadTimeout: Time-out for reading from an HTTP stream
WriteTimeout: Time-out for writing to an HTTP stream
Due to the huge volume of makerequest() calls we get from several hundred apps, we have to enforce these timeouts since our processes/threads cannot block due to servers that are slow from time to time. If we were to increase the timeouts and/or wait indefinitely for a server to respond requests will start queueing up on our servers (and due to a max queue size) and the web server will start sending out 503s.
Unfortunately, this is the tradeoffs we have to make.
If you don't absolutley need to use POSTs, my suggestion would be the following:
1. Use GETs
2. Maintain persistent connections i.e. do NOT close the connection after you send out responses from your script/servlet etc.
With GETs and persistent connections we should be able to use HTTP pipelining so that we can pump more requests per connection (assuming you're running an HTTP1.1 compliant web server)
In either case, you should run some benchmarks against your own servers to see how it performs under load. Please note that most calls coming thru' our system complete anywhere from 100ms to well under a second for the entire request end to end.