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

"The read operation timed out" #283

Open
cashpw opened this issue Jul 9, 2024 · 3 comments
Open

"The read operation timed out" #283

cashpw opened this issue Jul 9, 2024 · 3 comments

Comments

@cashpw
Copy link

cashpw commented Jul 9, 2024

Adding this here while I debug. I'm setting up lieer and notmuch on my laptop. It's already working on my desktop (set up a long time ago; not likely a data limit issue).

...
remote: increasing batch request size to: 50
receiving content:   2%|██▎                                                                                                                                                      | 695/45616 [00:57<41:21, 18.10it/s]remote: reducing batch request size to: 25
remote: increasing batch request size to: 50
receiving content:   2%|██▊                                                                                                                                                      | 822/45616 [01:30<57:48, 12.91it/s]Traceback (most recent call last):
  File "/usr/bin/gmi", line 24, in <module>
    g.main ()
  File "/usr/share/lieer/lieer/gmailieer.py", line 419, in main
    args.func(args)
  File "/usr/share/lieer/lieer/gmailieer.py", line 634, in pull
    self.full_pull()
  File "/usr/share/lieer/lieer/gmailieer.py", line 890, in full_pull
    updated = self.get_content(message_gids)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/lieer/lieer/gmailieer.py", line 988, in get_content
    self.remote.get_messages(need_content, _got_msgs, "raw")
  File "/usr/share/lieer/lieer/remote.py", line 141, in func_wrap
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/lieer/lieer/remote.py", line 410, in get_messages
    batch.execute()
  File "/usr/lib/python3/dist-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/googleapiclient/http.py", line 1515, in execute
    self._execute(http, self._order, self._requests)
  File "/usr/lib/python3/dist-packages/googleapiclient/http.py", line 1444, in _execute
    resp, content = http.request(
                    ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/google_auth_httplib2.py", line 218, in request
    response, content = self.http.request(
                        ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1701, in request
    (response, content) = self._request(
                          ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1421, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1373, in _conn_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1390, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 325, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 286, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1314, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1166, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out
receiving content:   2%|██▋                                                                                                                                                    | 822/45616 [02:13<2:01:12,  6.16it/s]
@cashpw
Copy link
Author

cashpw commented Jul 9, 2024

The lieer Timeout is 600:

$ gmi set
...
Timeout ...........: 600.000000
...

The TimeoutError occurs well before 600 seconds.

@bhatman
Copy link

bhatman commented Aug 5, 2024

I'm seeing a similar issue after Timeout is set to 0:

  File "/usr/lib/python3.12/ssl.py", line 1104, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out
fetching messages: 15200it [01:26, 176.53it/s]

Could this be some kind of rate limiting on the GMail side? I haven't been able to run a full sync due to this, yet; I usually get an initial timeout after 30 to 60 minutes, but if I try to resume, it times out after 2 minutes.

@gauteh
Copy link
Owner

gauteh commented Sep 18, 2024

The error looks like a client-side timeout.

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

3 participants