title: ResponseNotReady exception in python httplib2
body: <p>In a python thread I execute following statement:</p>
  
  <pre><code>(response, content) = httplib2.Http().request(endpoint, 'POST', body=data, headers={ 'content-type': 'application/rdf+xml' })
  </code></pre>
  
  <p>Most of the time it succeeds. But intermittently I am hitting following error:</p>
  
  <pre><code>  File "/usr/local/lib/python2.7/dist-packages/dataStoreManager.py", line 31, in loadData
      (response, content) = httplib2.Http().request(endpoint, 'POST', body=data, headers={ 'content-type': 'application/rdf+xml' })
    File "/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/__init__.py", line 1570, in request
      (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
    File "/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/__init__.py", line 1317, in _request
      (response, content) = self._conn_request(conn, request_uri, method, body, headers)
    File "/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/__init__.py", line 1286, in _conn_request
      response = conn.getresponse()
    File "/usr/lib/python2.7/httplib.py", line 1022, in getresponse
      raise ResponseNotReady()
  </code></pre>
  
  <p>If its relevant, I try to connect to an EC2 instance in us east zone from a laptop in west zone</p>
  
  <p>What is wrong?</p>
  
  <p>I have 20 threads (which all seem to work fine most of time) and each thread executes following code;</p>
  
  <pre><code>(response, content) = httplib2.Http().request(endpoint, 'POST', body=data, headers={ 'content-type': 'application/rdf+xml' })
  print "Response %s" % response.status
  </code></pre>