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

Fail graciously when there's no more file descriptors available. #158

Closed
lvets opened this issue Mar 24, 2017 · 2 comments
Closed

Fail graciously when there's no more file descriptors available. #158

lvets opened this issue Mar 24, 2017 · 2 comments

Comments

@lvets
Copy link

lvets commented Mar 24, 2017

Hello,

I forgot to increase the max. amount of file descriptors and instead of exiting ElectrumX filled approx. 64GB (Yes, GB) of log files with error messages. I believe at some point the original electrum-server checked the max. open files at startup.

Can we have some sort of check in place for ElectrumX?

@bauerj
Copy link
Contributor

bauerj commented Mar 24, 2017

What message filled your logs?

@lvets
Copy link
Author

lvets commented Mar 24, 2017

Lines and lines of:

ERROR:asyncio:Exception in callback BaseSelectorEventLoop._start_serving(functools.par...4f9b0>, 'TCP'), <socket.socke..
.2049, proto=6>, None, <Server sockets=None>, 100)
handle: <TimerHandle when=8402620.28011113 BaseSelectorEventLoop._start_serving(functools.par...4f9b0>, 'TCP'), <socket.
socke...2049, proto=6>, None, <Server sockets=None>, 100)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/events.py", line 126, in _run
    self._callback(*self._args)
  File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 169, in _start_serving
    protocol_factory, sock, sslcontext, server, backlog)
  File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 264, in _add_reader
    key = self._selector.get_key(fd)
  File "/usr/local/lib/python3.6/selectors.py", line 189, in get_key
    return mapping[fileobj]
  File "/usr/local/lib/python3.6/selectors.py", line 70, in __getitem__
    fd = self._selector._fileobj_lookup(fileobj)
  File "/usr/local/lib/python3.6/selectors.py", line 224, in _fileobj_lookup
    return _fileobj_to_fd(fileobj)
  File "/usr/local/lib/python3.6/selectors.py", line 41, in _fileobj_to_fd
    raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1

Grepping a 64GB file isn't easy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants