We migrated our service from 2.2.6. to 2.5.12. After this, on load testing we are getting this error:
builtins.ValueError: filedescriptor out of range in select()
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ddtrace/contrib/flask/patch.py", line 472, in _traced_request
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/dist-packages/ddtrace/contrib/flask/wrappers.py", line 25, in trace_func
return wrapped(*args, **kwargs)
File "./rest_api/include.py", line 865, in _wrapper
ret = func(reqData)
File "./rest_api/exportApi.py", line 677, in wrapper
locale=locale,
File "./rest_api/exportApi.py", line 433, in wrapper
s3file.write(buf.getvalue())
File "/usr/local/lib/python3.6/dist-packages/smart_open/s3.py", line 538, in __exit__
self.close()
File "/usr/local/lib/python3.6/dist-packages/smart_open/s3.py", line 452, in close
self._upload_next_part()
File "/usr/local/lib/python3.6/dist-packages/smart_open/s3.py", line 524, in _upload_next_part
upload = part.upload(Body=self._buf)
File "/usr/local/lib/python3.6/dist-packages/boto3/resources/factory.py", line 520, in do_action
response = action(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(**params)
File "/usr/lib/python3/dist-packages/botocore/client.py", line 324, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.6/dist-packages/ddtrace/contrib/botocore/patch.py", line 157, in patched_api_call
result = original_func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/botocore/client.py", line 609, in _make_api_call
operation_model, request_dict)
File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 143, in make_request
return self._send_request(request_dict, operation_model)
File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 172, in _send_request
success_response, exception):
File "/usr/lib/python3/dist-packages/botocore/endpoint.py", line 265, in _needs_retry
caught_exception=caught_exception, request_dict=request_dict)
File "/usr/lib/python3/dist-packages/botocore/hooks.py", line 227, in emit
return self._emit(event_name, kwargs)
File "/usr/lib/python3/dist-packages/botocore/hooks.py", line 210, in _emit
response = handler(**kwargs)
File "/usr/lib/python3/dist-packages/botocore/retryhandler.py", line 183, in __call__
if self._checker(attempts, response, caught_exception):
**ValueError: filedescriptor out of range in select()**
Frequency is 200 requests per 5 seconds. We are already on python 3.x, and we saw only one relevant document in stackoverflow regarding this error:
"filedescriptor out of range in select()" when using python's subprocess with rsync - Stack Overflow
.Can somebody guide me as to what steps we should take further?