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

Regression: Client keep-alive subsequent requests very slow #1997

Closed
nickkelsey opened this issue Dec 2, 2024 · 9 comments
Closed

Regression: Client keep-alive subsequent requests very slow #1997

nickkelsey opened this issue Dec 2, 2024 · 9 comments
Labels

Comments

@nickkelsey
Copy link

Linux, Client mode, OpenSSL and Poll defines set, keep-alive enabled, comparing 0.13.3 with 0.18.2.
Server is running Apache2 delivering static files, Content-Length used.

The first GET request takes about 200ms as expected.
With 0.13.3 the second and subsequent requests take around 60ms as expected.
With 0.18.2 the second and subsequent requests take anywhere from 4000ms to 5000ms.
If I don't enable keep-alive the requests takes around 200ms as expected.

@nickkelsey
Copy link
Author

Additional:
https, hence why the first request takes around 200ms.
Changing the read and write timeouts doesn't seem to make a difference.
Removing the poll define doesn't make a difference.

@nickkelsey
Copy link
Author

Correction - reducing the read timeout to 3s results in subsequent requests taking 3s. Setting the timeout longer than 4-5s does not change the 4-5s behavior.

@nickkelsey
Copy link
Author

Tracked down the exact version the problem was introduced...
0.18.1 works.
0.18.2 fails.

@yhirose
Copy link
Owner

yhirose commented Dec 2, 2024

@nickkelsey could you try this version?
#2000

Ref: #1969

@nickkelsey
Copy link
Author

I see "std::this_thread::sleep_for(microseconds{interval_usec});" added, but no change to the problem unfortunately.

@nickkelsey
Copy link
Author

If I revert the code in the two places where the new is_ssl_peer_could_be_closed() function is invoked everything works.

@yhirose
Copy link
Owner

yhirose commented Dec 2, 2024

Could you point the commit that starts causing the problem? Thanks!

@nickkelsey
Copy link
Author

Commenting out the call to is_ssl_peer_could_be_closed() in ClientImpl::send_ avoids the problem.
Looks to be Commit 970b528 relating to Fix 1980.

@yhirose yhirose added the bug label Dec 2, 2024
@yhirose
Copy link
Owner

yhirose commented Dec 2, 2024

Thanks for your help! I'll look into it when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants