Skip to content

Fixes max_duration not being respected #1

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

Closed

Conversation

r-martins
Copy link
Owner

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`.
@r-martins r-martins closed this May 12, 2022
@r-martins r-martins deleted the r-martins/bugfix/46316-maxDurationNotBeingRespected branch May 12, 2022 05:45
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