]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Fix to handle LE overload status 503 appropriately
authorMarkus Hoffrogge <mhoffrogge@gmail.com>
Wed, 1 Mar 2023 23:02:13 +0000 (00:02 +0100)
committerMarkus Hoffrogge <mhoffrogge@gmail.com>
Wed, 1 Mar 2023 23:46:52 +0000 (00:46 +0100)
- LE HTTP response status 503 is not an error, it must be handled via sleep and retry
- s. https://community.letsencrypt.org/t/new-service-busy-responses-beginning-during-high-load/184174

fixes #4530

acme.sh

diff --git a/acme.sh b/acme.sh
index 1df8a05358184dfe6e426d6ddfe2444df234b604..af2d0dfbad385d725280b7451fd19069717b7077 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -2229,6 +2229,12 @@ _send_signed_request() {
         _debug3 _body "$_body"
       fi
 
+      if [ "$code" = '503' ]; then
+        _sleep_overload_retry_sec=3
+        _info "It seems the CA server is currently overloaded, let's wait and retry. Sleeping $_sleep_overload_retry_sec seconds."
+        _sleep $_sleep_overload_retry_sec
+        continue
+      fi
       if _contains "$_body" "JWS has invalid anti-replay nonce" || _contains "$_body" "JWS has an invalid anti-replay nonce"; then
         _info "It seems the CA server is busy now, let's wait and retry. Sleeping $_sleep_retry_sec seconds."
         _CACHED_NONCE=""