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

[v5.0.0-beta.14] Invalid request phase transition from Connect to RequestHeaders #347

Closed
PNixx opened this issue Aug 24, 2023 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@PNixx
Copy link
Contributor

PNixx commented Aug 24, 2023

Trace:

#0 vendor/amphp/http-client/src/Connection/Http1Connection.php(558): Amp\Http\Client\Internal\EventInvoker->requestHeaderStart()
#1 vendor/amphp/http-client/src/Connection/Http1Connection.php(227): Amp\Http\Client\Connection\Http1Connection->writeRequest()
#2 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\Connection\Http1Connection->request()
#3 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\Connection\HttpStream->Amp\Http\Client\Connection\{closure}()
#4 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\processRequest()
#5 vendor/amphp/http-client/src/Connection/ConnectionLimitingPool.php(126): Amp\Http\Client\Connection\HttpStream->request()
#6 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\Connection\ConnectionLimitingPool->Amp\Http\Client\Connection\{closure}()
#7 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\Connection\HttpStream->Amp\Http\Client\Connection\{closure}()
#8 vendor/amphp/http-client/src/Connection/HttpStream.php(89): Amp\Http\Client\processRequest()
#9 vendor/amphp/http-client/src/Interceptor/DecompressResponse.php(43): Amp\Http\Client\Connection\HttpStream->request()
#10 vendor/amphp/http-client/src/Connection/InterceptedStream.php(56): Amp\Http\Client\Interceptor\DecompressResponse->requestViaNetwork()
#11 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\Connection\InterceptedStream->Amp\Http\Client\Connection\{closure}()
#12 vendor/amphp/http-client/src/Connection/InterceptedStream.php(61): Amp\Http\Client\processRequest()
#13 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(40): Amp\Http\Client\Connection\InterceptedStream->request()
#14 vendor/amphp/http-client/src/Connection/InterceptedStream.php(56): Amp\Http\Client\Interceptor\ModifyRequest->requestViaNetwork()
#15 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\Connection\InterceptedStream->Amp\Http\Client\Connection\{closure}()
#16 vendor/amphp/http-client/src/Connection/InterceptedStream.php(61): Amp\Http\Client\processRequest()
#17 vendor/amphp/http-client/src/PooledHttpClient.php(36): Amp\Http\Client\Connection\InterceptedStream->request()
#18 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\PooledHttpClient->Amp\Http\Client\{closure}()
#19 vendor/amphp/http-client/src/PooledHttpClient.php(37): Amp\Http\Client\processRequest()
#20 vendor/amphp/http-client/src/Interceptor/FollowRedirects.php(131): Amp\Http\Client\PooledHttpClient->request()
#21 vendor/amphp/http-client/src/InterceptedHttpClient.php(44): Amp\Http\Client\Interceptor\FollowRedirects->request()
#22 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\InterceptedHttpClient->Amp\Http\Client\{closure}()
#23 vendor/amphp/http-client/src/InterceptedHttpClient.php(49): Amp\Http\Client\processRequest()
#24 vendor/amphp/http-client/src/Interceptor/ModifyRequest.php(52): Amp\Http\Client\InterceptedHttpClient->request()
#25 vendor/amphp/http-client/src/InterceptedHttpClient.php(44): Amp\Http\Client\Interceptor\ModifyRequest->request()
#26 vendor/amphp/http-client/src/functions.php(19): Amp\Http\Client\InterceptedHttpClient->Amp\Http\Client\{closure}()
#27 vendor/amphp/http-client/src/InterceptedHttpClient.php(49): Amp\Http\Client\processRequest()
#28 vendor/amphp/http-client/src/HttpClient.php(35): Amp\Http\Client\InterceptedHttpClient->request()
#29 vendor/amphp/http-client/src/functions.php(29): Amp\Http\Client\HttpClient->Amp\Http\Client\{closure}()
#30 vendor/amphp/http-client/src/HttpClient.php(36): Amp\Http\Client\processRequest()
#31 vendor/webgriffe/amp-elasticsearch/src/Client.php(604): Amp\Http\Client\HttpClient->request()
@kelunik
Copy link
Member

kelunik commented Aug 24, 2023

@PNixx Thanks, that's exactly the kind of issues I'm looking for with the new beta. How can I reproduce this?

@kelunik kelunik self-assigned this Aug 24, 2023
@kelunik kelunik added the bug label Aug 24, 2023
@kelunik kelunik added this to the 5.x milestone Aug 24, 2023
@PNixx
Copy link
Contributor Author

PNixx commented Aug 25, 2023

I can't advise you. After updating on the production server, such an error began to occur in various HTTP requests, and only with the HTTP 1 protocol.

@PNixx
Copy link
Contributor Author

PNixx commented Aug 25, 2023

I use one client initialization with connection pool for all requests. Perhaps the problem is somewhere in this place.

kelunik added a commit that referenced this issue Aug 26, 2023
@kelunik
Copy link
Member

kelunik commented Aug 26, 2023

Thanks, the hint with only HTTP/1.x has been really helpful. I've managed to write a failing test in eba31d5. I'm not sure yet how to solve this.

@kelunik kelunik closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants