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

Instance of "Symfony\Component\HttpClient\Response\CurlResponse" is already consumed and cannot be managed by "Symfony\Component\HttpClient\RetryableHttpClient". A decorated client should not call any of the response's methods in its "request()" method. #1709

Open
victor-upmeet opened this issue May 7, 2024 · 3 comments

Comments

@victor-upmeet
Copy link

Hi,

When using symfony/messenger with symfony/amazon-sqs-messenger, every once in a while we get the following error:

Instance of "Symfony\Component\HttpClient\Response\CurlResponse" is already consumed and cannot be managed by "Symfony\Component\HttpClient\RetryableHttpClient". A decorated client should not call any of the response's methods in its "request()" method.
Stack Trace:
#0 /var/www/vendor/symfony/http-client/Response/AsyncResponse.php:286
#1 /var/www/vendor/symfony/http-client/Response/ResponseStream.php:47
#2 /var/www/vendor/async-aws/core/src/Response.php:149
#3 /var/www/vendor/async-aws/core/src/Result.php:69
#4 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:234
#5 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:374
#6 /var/www/vendor/symfony/amazon-sqs-messenger/Transport/Connection.php:80

As stacktrace shows, all this is triggered when resetting the connection, but it looks like the issue lies in how the response is resolved by async-aws/core.

@joricksteenstra
Copy link

We're experiencing the same issue, did you by any chance have a work around?

@victor-upmeet
Copy link
Author

Actually no. We just filter out these errors so we don't get unnecessary alerts when they are encountered. We have several symfony messenger consumers who stop every hour, so we have this error a few times a day as it is sometimes triggered, but not always, when consumer is stopped.

@mrblur
Copy link

mrblur commented Jul 12, 2024

This hit us hard as every consumed message ends up with this exception and killed consumer.
We use elasticmq on local development and onpremise installations. On 2.1.0 consumers are working fine, maybe this would help to pin the issue.

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

No branches or pull requests

3 participants