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

Ensure connection stays open for long running processes #457

Closed
hagenw opened this issue Nov 11, 2024 · 3 comments
Closed

Ensure connection stays open for long running processes #457

hagenw opened this issue Nov 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@hagenw
Copy link
Member

hagenw commented Nov 11, 2024

When publishing a dataset with audb.publish() takes longer than 24h, it might throw an error after some time, e.g. with the minio backend I got after 31 h:

Traceback (most recent call last):                                                                                            
  File "/data/hwierstorf/.envs/libri-light-1.0.0/lib/python3.10/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(                                                     
  File "/data/hwierstorf/.envs/libri-light-1.0.0/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()                                                      
  File "/data/hwierstorf/.envs/libri-light-1.0.0/lib/python3.10/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()                          
  File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse
    response.begin()                                                                                                                                                          
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()                  
  File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

A similar error for large datasets, but after a shorter (random) time we get for the artifactory backend.

@hagenw hagenw added the bug Something isn't working label Nov 11, 2024
@hagenw
Copy link
Member Author

hagenw commented Nov 11, 2024

HTTP keep alive seems to be enabled on the server we are trying to upload from:

$ curl -Iv s3.dualstack.eu-north-1.amazonaws.com 2>&1 | grep -i 'connection #0'
* Connection #0 to host s3.dualstack.eu-north-1.amazonaws.com left intact

@hagenw
Copy link
Member Author

hagenw commented Nov 11, 2024

As this kind of error can usually be handled by restarting the publication process, we might simply catch the error during publication and try to re-establish a connection and continue with publication.

@hagenw
Copy link
Member Author

hagenw commented Nov 29, 2024

Fixed by audeering/audbackend#242

@hagenw hagenw closed this as completed Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant