Python multiple requests socket issue
===

I'm trying to code up a server/handler which is able to receive a large number of requests concurrently.  So it works up to a certain point, but after that point completely dies.  I'm getting from the client program, the error, 

    Exception in thread Thread-88:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
        self.run()
      File "/usr/lib/python2.7/threading.py", line 755, in run
        self.function(*self.args, **self.kwargs)
      File "tester.py", line 12, in caller
        response = connection.getresponse().read()
      File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
        response.begin()
      File "/usr/lib/python2.7/httplib.py", line 407, in begin
        version, status, reason = self._read_status()
      File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
        raise BadStatusLine(line)
    BadStatusLine: ''

and then, the logs the server prints to show the error:

    Exception happened during processing of request from ('127.0.0.1', 46432)
    Traceback (most recent call last):
      File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
        self.finish_request(request, client_address)
      File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
        self.finish()
      File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
        self.wfile.flush()
      File "/usr/lib/python2.7/socket.py", line 303, in flush
        self._sock.sendall(view[write_offset:write_offset+buffer_size])
    error: [Errno 88] Socket operation on non-socket

What is especially annoying about this is that, not merely are all those queries which are done close to each other get these errors, but also then any other request, until I restart the server, get's that same issue.

Has anybody came across something like this or know what could be causing this?  Thanks.