Skip to content

Commit 8d59ced

Browse files
committed
feature #18288 [HttpClient] Add max_retries setting docs on the RetryableHttpClient (danielburger1337)
This PR was submitted for the 6.3 branch but it was merged into the 6.4 branch instead. Discussion ---------- [HttpClient] Add `max_retries` setting docs on the `RetryableHttpClient` References [#50240](symfony/symfony#50240) Commits ------- bf57a3e Add 'max_retries' setting docs on the RetryableHttpClient
2 parents e12d816 + bf57a3e commit 8d59ced

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

http_client.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,10 @@ making a request. Use the ``max_redirects`` setting to configure this behavior
706706
Retry Failed Requests
707707
~~~~~~~~~~~~~~~~~~~~~
708708

709+
.. versionadded:: 6.3
710+
711+
The ``max_retries`` feature was added in Symfony 6.3.
712+
709713
Sometimes, requests fail because of network issues or temporary server errors.
710714
Symfony's HttpClient allows to retry failed requests automatically using the
711715
:ref:`retry_failed option <reference-http-client-retry-failed>`.
@@ -714,7 +718,8 @@ By default, failed requests are retried up to 3 times, with an exponential delay
714718
between retries (first retry = 1 second; third retry: 4 seconds) and only for
715719
the following HTTP status codes: ``423``, ``425``, ``429``, ``502`` and ``503``
716720
when using any HTTP method and ``500``, ``504``, ``507`` and ``510`` when using
717-
an HTTP `idempotent method`_.
721+
an HTTP `idempotent method`_. Use the ``max_retries`` setting to configure the amount
722+
of times a request is retried.
718723

719724
Check out the full list of configurable :ref:`retry_failed options <reference-http-client-retry-failed>`
720725
to learn how to tweak each of them to fit your application needs.

0 commit comments

Comments
 (0)