-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use epoll instead of select #1053
Comments
What command are you running and can you provide the output of adding |
Hi I don't know how to add --debug, but here is the exception info: I looked at the log again, maybe I should ask the question in "botocore" project? Thanks Traceback (most recent call last): |
Has there been any updates on this? I did not see an issue in botocore for it. I am running into the issue in my program after it runs for several hours and I haven't found a workaround for it. My client code is running the following inside of its own thread: session = boto3.session.Session(aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY)
s3 = session.client('s3')
s3_path = local_path.replace(LOCAL_LOGS_DIR, 'data')
s3.upload_file(local_path, S3_BUCKET, s3_path) I'm running inside the Python 3.6.1 Docker container with the following library versions: Here's the stacktrace for my version:
|
May I suggest vendoring/using selectors2 or an equivalent library? (Disclosure: I'm the author of selectors2) |
No I don't have a solution. I agree the fix should be in botocore, to change the library of select. |
While digging into it more, I discovered my program was leaking threads, which led to the high file descriptor count and hitting the error. After fixing the thread leak, the problem went away. |
Looks like this is an issue in the |
overselect.py: import boto3
files = [open("/tmp/{}".format(i), 'w') for i in range(1024)]
boto3.client('s3').upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt')
Looks like select is imported both in the vendored version of urllib3 and in botocore/awsrequest.py |
Linux allows to open 1024 files per process at the same time (http://docs.oracle.com/cd/E19450-01/820-6168/file-descriptor-requirements.html). Therefore the above overselect.py does not work. Is this 'boto' task to omitting OS limitations? |
@JordonPhillips @kyleknap Any updates? @XMementoIT You are mistaken; linux does not have a fixed limitation on the number of open files per process. In fact, the link you shared explains how to adjust some of the relevant system limits. |
Python's To avoid the select() call in awsrequest.py, add the workaround to skip it:
|
any updates? We hit this issue too |
Following up on this issue. Considering it's a old issue, is anyone still getting this error with latest version of sdk ? If anyone is still getting the error please reopen a new issue. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
hi, I get errors "ValueError: filedescriptor out of range in select()" when uploading files in my application. Looks like it's because boto3 uses select() instead of epoll for socket. Can this be changed? Thanks
The text was updated successfully, but these errors were encountered: