Skip to content

Regression v8.13.0: No connections available for Windows WebKit #17020

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

Closed
fujii opened this issue Apr 11, 2025 · 2 comments
Closed

Regression v8.13.0: No connections available for Windows WebKit #17020

fujii opened this issue Apr 11, 2025 · 2 comments
Assignees

Comments

@fujii
Copy link

fujii commented Apr 11, 2025

I did this

I'm using libcurl for Windows WebKit.
After upgrading libcurl from v8.12.1 to v8.13.0, it has some network errors by browsing some web pages.
For example, by reloading https://www.yomiuri.co.jp/ 2 or 3 times.

I took a libcurl log. it has a lot of No connections available..

I bisected. df67269 is the regression point.

I expected the following

No response

curl/libcurl version

libcurl 8.13.0

operating system

Windows 11

@icing icing self-assigned this Apr 11, 2025
@icing
Copy link
Contributor

icing commented Apr 11, 2025

Can you describe "has some network errors" more precisely? I suspect that the "No connections available" results from curl counting connections in shutdown against the CURLMOPT_MAX_TOTAL_CONNECTIONS limit.

Before, this was not done and only the "live" connections counted. Same for CURLMOPT_MAX_HOST_CONNECTIONS.

I suspect this results in timeouts in the application?

You could test this by increasing the limits that WebKit seems to set.

/cc @bagder

If this is indeed the issue, we need to decide who libcurl is supposed to handle this. Do we want to immediately close the oldest connection in shutdown when this pressure situation happens. Or do we prioritise a clean shutdown and the application has to adapt?

I think we only get deterministic behaviour for the application, if we force close shutdowns in such situations.

A PR with force closing connections in shutdown under pressure is in #17022

icing added a commit to icing/curl that referenced this issue Apr 11, 2025
when CURLMOPT_MAX_HOST_CONNECTIONS or CURLMOPT_MAX_TOTAL_CONNECTIONS
limits are reached, force close connections in shutdown to go below
limit when possible.

refs curl#17020
@bagder bagder closed this as completed in ff37657 Apr 11, 2025
@fujii
Copy link
Author

fujii commented Apr 13, 2025

I confirmed it resolved the problem. Thank you very much.

Windows WebKit uses 17 and 6 for CURLMOPT_MAX_TOTAL_CONNECTIONS and CURLMOPT_MAX_HOST_CONNECTIONS.
Yes, timeout was happening. It happened just by reloading https://www.yomiuri.co.jp/ 2 or 3 times. After that, all resource requests timed out from www.yomiuri.co.jp. But, it could load pages from other sites.

nbaws pushed a commit to nbaws/curl that referenced this issue Apr 26, 2025
when CURLMOPT_MAX_HOST_CONNECTIONS or CURLMOPT_MAX_TOTAL_CONNECTIONS
limits are reached, force close connections in shutdown to go below
limit when possible.

Fixes curl#17020
Reported-by: Fujii Hironori
Closes curl#17022
nbaws pushed a commit to nbaws/curl that referenced this issue Apr 26, 2025
when CURLMOPT_MAX_HOST_CONNECTIONS or CURLMOPT_MAX_TOTAL_CONNECTIONS
limits are reached, force close connections in shutdown to go below
limit when possible.

Fixes curl#17020
Reported-by: Fujii Hironori
Closes curl#17022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants