Skip to content

Commit

Permalink
Increase cert lock time
Browse files Browse the repository at this point in the history
  • Loading branch information
kfigiela committed Jun 22, 2021
1 parent c1aae9e commit 65b3451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/resty/acme/autossl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ local domain_whitelist, domain_whitelist_callback
local certs_cache = {}
local CERTS_CACHE_TTL = 3600
local CERTS_CACHE_NEG_TTL = 5
local CERTS_LOCK_TTL = 300


local update_cert_lock_key_prefix = "update_lock:"
Expand Down Expand Up @@ -222,7 +223,7 @@ function AUTOSSL.update_cert(data)
-- you submit an order with different CSR while the previous order is still pending
-- you will get the previous order (with `expires` capped to an integer second).
local lock_key = update_cert_lock_key_prefix .. ":" .. data.domain
local err = AUTOSSL.storage:add(lock_key, "1", CERTS_CACHE_NEG_TTL)
local err = AUTOSSL.storage:add(lock_key, "1", CERTS_LOCK_TTL)
if err then
ngx.log(ngx.INFO,
"update is already running (lock key ", lock_key, " exists), current type ", data.type)
Expand Down

0 comments on commit 65b3451

Please sign in to comment.