GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Avoid socket timeouts when executing commands by loicleyendecker · Pull Request #3125 · docker/docker-py

Conversation

@loicleyendecker

@loicleyendecker loicleyendecker commented May 10, 2023

Copy link
Copy Markdown
Contributor

Only listen to read events when polling a socket in order to avoid incorrectly trying to read from a socket that is not actually ready.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

humitos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@loicleyendecker
loicleyendecker requested review from aiordache and ulyssessouza as code owners May 10, 2023 13:01
@loic-slamcore loic-slamcore mentioned this pull request May 10, 2023
socket timeout when docker exec lasts too long #3124
Closed
domidimi
domidimi reviewed May 11, 2023
View reviewed changes
Comment thread docker/utils/socket.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@loicleyendecker
Avoid socket timeouts when executing commands
e8b6d33
Only listen to read events when polling a socket in order
to avoid incorrectly trying to read from a socket that is
not actually ready.

Signed-off-by: Loïc Leyendecker <[email protected]>
@milas milas self-assigned this May 11, 2023
milas
milas approved these changes May 11, 2023
View reviewed changes

@milas milas left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh good catch, thanks for the PR!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@milas
milas merged commit c5e582c into docker:main May 11, 2023
felixfontein added a commit to felixfontein/community.docker that referenced this pull request May 12, 2023
@felixfontein @loicleyendecker
api: avoid socket timeouts when executing commands (docker/docker-py#…
287bcf1
…3125)

Only listen to read events when polling a socket in order
to avoid incorrectly trying to read from a socket that is
not actually ready.

Cherry-picked from docker/docker-py@c5e582c

Co-authored-by: Loïc Leyendecker <[email protected]>
felixfontein added a commit to ansible-collections/community.docker that referenced this pull request May 20, 2023
@felixfontein @milas
@I-question-this @ImogenBits @loicleyendecker
vendored Docker SDK for Python code: update to latest version (#619)
1660bf4
* socket: fix for errors on pipe close in Windows (docker/docker-py#3099)

Need to return data, not size. By returning an empty
string, EOF will be detected properly since `len()`
will be `0`.

Fixes docker/docker-py#3098.

Cherry-picked from docker/docker-py@f846232

Co-authored-by: Milas Bowman <[email protected]>

* socket: use poll() instead of select() except on Windows (docker/docker-py#2865)

Fixes docker/docker-py#2278, which was originally addressed in docker/docker-py#2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Cherry-picked from docker/docker-py@a02ba74

Co-authored-by: Tyler Westland <[email protected]>

* api: respect timeouts on Windows named pipes (docker/docker-py#3112)

Cherry-picked from docker/docker-py@9cadad0

Co-authored-by: Imogen <[email protected]>

* Add URL to changelog.

* api: avoid socket timeouts when executing commands (docker/docker-py#3125)

Only listen to read events when polling a socket in order
to avoid incorrectly trying to read from a socket that is
not actually ready.

Cherry-picked from docker/docker-py@c5e582c

Co-authored-by: Loïc Leyendecker <[email protected]>

---------

Co-authored-by: Milas Bowman <[email protected]>
Co-authored-by: Tyler Westland <[email protected]>
Co-authored-by: Imogen <[email protected]>
Co-authored-by: Loïc Leyendecker <[email protected]>
humitos added a commit to readthedocs/readthedocs.org that referenced this pull request May 23, 2023
@humitos
Requirements: upgrade Docker
c35210a
We are hitting an error with socket timeout on production when running long
commands.

See docker/docker-py#3125
@humitos humitos mentioned this pull request May 23, 2023
Requirements: upgrade Docker readthedocs/readthedocs.org#10341
Merged
humitos added a commit to readthedocs/readthedocs.org that referenced this pull request May 23, 2023
@humitos
Requirements: upgrade Docker
885e3a3
We are hitting an error with socket timeout on production when running long
commands.

See docker/docker-py#3125
humitos added a commit to readthedocs/readthedocs.org that referenced this pull request May 23, 2023
@humitos
Requirements: upgrade Docker
2a86186
We are hitting an error with socket timeout on production when running long
commands.

See docker/docker-py#3125
humitos added a commit to readthedocs/readthedocs.org that referenced this pull request May 23, 2023
@humitos
Requirements: upgrade Docker (#10341)
dc80cda
We are hitting an error with socket timeout on production when running long
commands.

See docker/docker-py#3125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aiordache aiordache Awaiting requested review from aiordache
@ulyssessouza ulyssessouza Awaiting requested review from ulyssessouza
2 more reviewers
@domidimi domidimi domidimi left review comments
@milas milas milas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@milas milas

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@loicleyendecker @domidimi @milas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.