Skip to content

Conversation

r-martins
Copy link

As reported on #46316, when a request gets a successful response in further attempts, the max_duration is not respected and the request may take longer than the value especified here.

My way to solve the issue was by reducing the timeout option in future requests, making it smaller in every attempt. By doing so, the total time of a $client->request will never be much longer than max_duration. Perhaps a second or two maybe, due to the waiting time between requests, but not as much as the timeout.

As reported on [#46316](symfony/symfony#46316), when a request gets a successful response in further attempts, the `max_duration` is not respected and the request may take longer than the value especified here.

My way to solve the issue was by reducing the timeout option in future requests, making it smaller in every attempt. By doing so, the total time of a $client->request will never be much longer than `max_duration`. Perhaps a second or two maybe, due to the waiting time between requests, but not as much as the `timeout`.
@symfony-bot
Copy link

symfony-bot bot commented May 12, 2022

Thanks for your pull request! We love contributions.

However, this repository is what we call a "subtree split": a read-only copy of one directory of the main Symfony repository. It is used by Composer to allow developers to depend on specific Symfony components.

If you want to contribute, you should instead open a pull request on the main repository:

https://github.com/symfony/symfony

Thank you for your contribution!

PS: if you haven't already, please add tests, and beware that bug fixes should be submitted on the lowest maintained branch where they apply.

@r-martins
Copy link
Author

PR moved to symfony/symfony/pull/46330

@r-martins r-martins closed this May 12, 2022
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

Successfully merging this pull request may close these issues.

1 participant