8000 Add 'max_retries' setting docs on the RetryableHttpClient · symfony/symfony-docs@bf57a3e · GitHub
[go: up one dir, main page]

Skip to content

Commit bf57a3e

Browse files
danielburger1337OskarStark
authored andcommitted
Add 'max_retries' setting docs on the RetryableHttpClient
1 parent e12d816 commit bf57a3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

http_client.rst

+6-1
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)
0