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

Handle RuntimeError #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 8, 2020

  1. Handle RuntimeError

    Some times when warcprox runs for several days under load it freezes
    and the last error in the log is:
    ```
    WARNING:warcprox.warcproxy.WarcProxy:exception processing request
    <socket.socket fd=53, family=AddressFamily.AF_INET,
    type=SocketKind.SOCK_STREAM, proto=0, laddr=('207.241.225.241', 8003),
    raddr=('207.241.225.241', 40738)> from ('207.241.225.241', 40738)
    Traceback (most recent call last):
      File "/usr/lib/python3.7/socketserver.py", line 316, in
    _handle_request_noblock
        self.process_request(request, client_address)
      File "/opt/spn2/lib/python3.7/site-packages/warcprox/mitmproxy.py",
    line 641, in process_request
        self.process_request_thread, request, client_address)
      File "/usr/lib/python3.7/concurrent/futures/thread.py", line 172, in
    submit
        self._adjust_thread_count()
      File "/usr/lib/python3.7/concurrent/futures/thread.py", line 193, in
    _adjust_thread_count
        t.start()
      File "/usr/lib/python3.7/threading.py", line 852, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
    ```
    The process seems to run but it doesn't respond to any connection, not
    even `status` requests.
    
    We handle this exception and allow it to continue operation.
    Vangelis Banos committed Jul 8, 2020
    Configuration menu
    Copy the full SHA
    89e6745 View commit details
    Browse the repository at this point in the history