Concurrent requests
AngularProUser opened this issue · comments
Guzzle version(s) affected: 7.5.0 -> 7.7.0
PHP version: 8.2.1 (hint: php --version
)
cURL version: 7.85.0 (hint: php -i | grep cURL
)
Description
I send multiple requests concurrently using the example here
https://docs.guzzlephp.org/en/stable/quickstart.html#concurrent-requests
my code work as expected using php 7.4.30 (curl 7.70.0), since upgrade the code to php 8.2.1 (curl 7.85.0),
execution time is longer, it is like requests as sent one after the other or in blocking mode
one request execution time ~220ms
php 7.4.30 : 17 requests send concurrently execution time ~600ms
php 8.2.1 : 17 requests send concurrently execution time ~3000ms
How to reproduce
Possible Solution
Additional context
Do both PHP versions have the same version of OpenSSL?
Are you able to try with PHP 8.2.6, instead of 8.2.0?
If you think they are going 1 by 1, that could be an indicator that curl is actually not being used. You could jam some var-dumps into the vendor directory to see what is going on.
No; OpenSSL version are not the same.
i try with PHP 8.2.6, and the result is same as PHP 8.2.1
What are the OpenSSL versions? OpenSSL 3.x is known to be slower than OpenSSL 1.1.x for TLS negotiation in many circumstances.
Below OpenSSL versions
OpenSSL 1.1.1o 7.4.30
OpenSSL 3.0.7 8.2.1
OpenSSL 3.0.8 8.2.6
Probably the root cause is openssl. i'd recommend trying php 8.2 with openssl 1.1.1. If this the case, there's not a lot we can do - the bug is outside of our control, and would be present in all PHP HTTP clients on github.
Thank you for help.
I found this issue with bref php issue , which is apparently link to openssl 3.
Since i also use bref PHP 8.2, i will wait for a possible fix.
I believe OpenSSL 3.2.0-beta1 (and 3.2.0 which is due be released in the next few days) may fix this issue.