🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Dec 10, 2025

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
@hroncok
Copy link
Contributor

hroncok commented Dec 10, 2025

Thanks. I'll check if this makes a difference in ELN/EPEL builds.

@hroncok
Copy link
Contributor

hroncok commented Dec 10, 2025

I submitted 5 builds each for Python 3.15.0a2 (on ELN), 3.14.2 (on ELN), and 3.13.11 (on EPEL 10.1), with this PR backported as well as 5 builds each without it.

Statistically, this improves things.

Without this patch, 7 out of the total 15 builds failed with ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection or ConnectionAbortedError: SSL handshake is taking longer than 67.5 seconds: aborting the connection.

With this patch applied, only one failed with ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection. It was a Python 3.13.11 build on EPEL 10.1 https://koji.fedoraproject.org/koji/taskinfo?taskID=139890933

What worries me a bit is that the exception still mentions 67.5 or 60.0 seconds. As if the SSL handshake had its own timeout set?

@vstinner
Copy link
Member Author

With this patch applied, only one failed with ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection. It was a Python 3.13.11 build on EPEL 10.1 https://koji.fedoraproject.org/koji/taskinfo?taskID=139890933

Hum. There were remaining open_connection() calls with the default timeout of asyncio.constants.SSL_HANDSHAKE_TIMEOUT seconds (60 seconds). I updated the PR to set the timeout to LONG_TIMEOUT instead.

What worries me a bit is that the exception still mentions 67.5 or 60.0 seconds. As if the SSL handshake had its own timeout set?

Yes, it's asyncio.constants.SSL_HANDSHAKE_TIMEOUT default value of 60 seconds.

support.LONG_TIMEOUT is a least 5 minutes.

@hroncok
Copy link
Contributor

hroncok commented Dec 10, 2025

Trying again.

@vstinner vstinner enabled auto-merge (squash) December 10, 2025 22:01
@vstinner vstinner merged commit dc3ece2 into python:main Dec 10, 2025
44 checks passed
@vstinner vstinner deleted the test_asyncio branch December 10, 2025 22:21
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2025
…honGH-142523)

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
And add the HANDSHAKE_TIMEOUT constant.
(cherry picked from commit dc3ece2)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 10, 2025
…honGH-142523)

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
And add the HANDSHAKE_TIMEOUT constant.
(cherry picked from commit dc3ece2bc06d56c21ef81f86424b4598880ba1c8)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

bedevere-app bot commented Dec 10, 2025

GH-142545 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 10, 2025
@bedevere-app
Copy link

bedevere-app bot commented Dec 10, 2025

GH-142546 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 10, 2025
@vstinner
Copy link
Member Author

Merged, thanks for testing @hroncok. I hope that this change will make timeout errors less likely on very slow CIs.

vstinner added a commit that referenced this pull request Dec 10, 2025
…-142523) (#142546)

gh-142489: Increase ssl_handshake_timeout in asyncio tests (GH-142523)

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
And add the HANDSHAKE_TIMEOUT constant.
(cherry picked from commit dc3ece2)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Dec 10, 2025
…-142523) (#142545)

gh-142489: Increase ssl_handshake_timeout in asyncio tests (GH-142523)

Replace SHORT_TIMEOUT with LONG_TIMEOUT for very slow CIs.
And add the HANDSHAKE_TIMEOUT constant.
(cherry picked from commit dc3ece2)

Co-authored-by: Victor Stinner <vstinner@python.org>
@hroncok
Copy link
Contributor

hroncok commented Dec 10, 2025

Trying again.

30 builds (10 for each Python version) and no timeout. Seems to work properly now, thanks.

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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants