I have a test suite with about 300 test cases. These test cases are HTTP API Calls. All are 'GET' API calls. The initial test cases execute fine. But towards the end of the execution, the error "error: [Errno 24] Too many open files" is thrown. This causes the test cases to fail even though we do not have any functional issue in the system under test.
How to fix this issue?
The error in the report is:
error: [Errno 24] Too many open files
08:55:00.484 DEBUG Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/HttpLibrary/__init__.py", line 229, in GET
self.app.get(path, {}, self.context.request_headers)
File "/Library/Python/2.7/site-packages/webtest/app.py", line 286, in get
File "/Library/Python/2.7/site-packages/HttpLibrary/livetest.py", line 153, in do_request
File "/Library/Python/2.7/site-packages/HttpLibrary/livetest.py", line 126, in _do_httplib_request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 973, in request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1007, in _send_request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 969, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 829, in _send_output
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 791, in send
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 772, in connect
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 571, in create_connection