-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpClient] Timeout or max_duration not honored #49113
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
Comments
My mistake: I was testing the reproducer on a PHP version without the curl extension, hence the observation. So the reproducer is invalid. I am still investigating however, because I still have a problem of timeouts not honored on parallel requests. I will provide more information later today. Best regards |
The thing that changed is #48966 |
Here is a correct reproducer:
and the output:
The problem is not related to parallel requests, I updated the title of the issue. I think the observed time is related to a failure in DNS resolution, but why doesn't curl honor the Any suggestion would be greatly appreciated! Thanks! |
One more thing: I am trying to force my request to stop after a specific time using:
And I see lines like those:
How is that possible? It looks like either the CustomTimeoutException is not thrown or maybe it is but doesn't interrupt the request? |
This now looks like a duplicate of #47246, and we can't do anything about it unfortunately. |
Thanks! Yes, thanks for pointing this, it looks like it is the same issue. I is indeed related to curl, not to HttpClient. Here are a few more observations which may be useful to other people encountering this issue! TL;DR: it is fixed by curl/curl#9147 A minimal
I am running the php:8.2.1-fpm Docker image. It contains this version of curl:
I obtain:
That's 15 seconds instead of 1 expected. Now, I create the following Dockerfile:
I now have:
I obtain:
1 second, as expected
That's 5 seconds, not 1, but it is still much better than previously! Conclusion: update curl! Best regards |
Thanks for the link to curl. I submitted php/php-src#10454 to have this accessible in php. |
Symfony version(s) affected
6.2.5
Description
I observe a regression in v6.2.5: #44544 was fixed and is now happening again.
How to reproduce
The output is:
But the last value should be around 5 s not 50 s.
Thanks!
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: