Skip to content
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

Too many open files #764

Closed
ecerulm opened this issue Feb 4, 2016 · 3 comments
Closed

Too many open files #764

ecerulm opened this issue Feb 4, 2016 · 3 comments
Labels

Comments

@ecerulm
Copy link

ecerulm commented Feb 4, 2016

I have script that continuously fetches an URL. After a couple of thousand request it starts failing with "too many open files".

 async def get_report(self):
  with aiohttp.Timeout(3):
    async with aiohttp.get(URL) as resp:
      content = await rest.text()
      resp.close()
   return content

Am I doing something wrong? or is it leaking file descriptors?

@ecerulm
Copy link
Author

ecerulm commented Feb 4, 2016

The traceback
Traceback (most recent call last):

  File "/home/ecerulm/.pyenv/versions/tm500ws/lib/python3.5/site-packages/aiohttp/connector.py", line 310, in connect
  File "/home/ecerulm/.pyenv/versions/tm500ws/lib/python3.5/site-packages/aiohttp/connector.py", line 604, in _create_connection
aiohttp.errors.ClientOSError: [Errno 24] Can not connect to 10.68.83.112:5002 [Too many open files]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "xxxxxx.py", line 128, in send_report
  File "xxxxxx.py", line 214, in get_report
  File "/home/ecerulm/.pyenv/versions/tm500ws/lib/python3.5/site-packages/aiohttp/client.py", line 538, in __aenter__
  File "/home/ecerulm/.pyenv/versions/tm500ws/lib/python3.5/site-packages/aiohttp/client.py", line 183, in _request
  File "/home/ecerulm/.pyenv/versions/tm500ws/lib/python3.5/site-packages/aiohttp/connector.py", line 320, in connect
aiohttp.errors.ClientOSError: [Errno 24] Cannot connect to host 10.68.83.112:5002 ssl:False [Can not connect to 10.68.83.112:5002 [Too many open files]]

@ecerulm
Copy link
Author

ecerulm commented Feb 4, 2016

Nevermind the files descriptors are leaked in another part of the script unrelated with aiohttp is just that is always aiohttp the one that notices it.

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants