Skip to content

Occasional Timeout Error #34

Description

@mesudip

The container is working without issues, but occasionally there are these logs with timeout error

Logs

No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
Unexpected error :ReadTimeout -> UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py", line 534, in _make_request
    response = conn.getresponse()
  File "/usr/local/lib/python3.13/site-packages/urllib3/connection.py", line 565, in getresponse
    httplib_response = super().getresponse()
  File "/usr/local/lib/python3.13/http/client.py", line 1428, in getresponse
    response.begin()
    ~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
                              ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/socket.py", line 719, in readinto
    return self._sock.recv_into(b)
           ~~~~~~~~~~~~~~~~~~~~^^^
TimeoutError: timed out

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/usr/local/lib/python3.13/site-packages/urllib3/util/retry.py", line 474, in increment
    raise reraise(type(error), error, _stacktrace)
          ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/urllib3/util/util.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py", line 367, in _raise_timeout
    raise ReadTimeoutError(
        self, url, f"Read timed out. (read timeout={timeout_value})"
    ) from err
urllib3.exceptions.ReadTimeoutError: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/main.py", line 81, in eventLoop
    process_container_event(eventAction, event)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/app/main.py", line 98, in process_container_event
    server.update_container(event["id"])
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/app/nginx_proxy/WebServer.py", line 282, in update_container
    if self._register_container(self.client.containers.get(container_id)):
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/docker/models/containers.py", line 954, in get
    resp = self.client.api.inspect_container(container_id)
  File "/usr/local/lib/python3.13/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/docker/api/container.py", line 794, in inspect_container
    self._get(self._url("/containers/{0}/json", container)), True
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/docker/utils/decorators.py", line 44, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/docker/api/client.py", line 246, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
           ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
requests.exceptions.ReadTimeout: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test
No VIRTUAL_HOST       	Id:7e39336678d8	    e97b69a4-cbdb-4391-b274-1f057d8fd76e-mcp-hello-world-test

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions