auto-ssl / auto-ssl/lua-resty-auto-ssl

Renewal job never getting fired due to process exit

Open
#143 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
2k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

Hey!

So we recently had a problem where our certs weren't getting regenerated. The reason for this was that our openresty processes were never up for the default 24hrs timeout (due to #136); so the renewal job was never firing. I can reduce the renewal_interval to something smaller, but I have to pluck a number out of the sky to estimate our average process uptime, which i'm not sure of right now.

Can we maybe do one of the following:

- accept a `renew_check_time` option, which you give a time format like `hh:mm` e.g. "00:00" will always perform the renewal at midnight
- persist to storage the last time a successful renewal occurred. On startup, check if that is further away from the current time than the `renew_check_interval`? Then trigger the renewal if it is?

I think in the meantime I'm going to attempt to have another server running, whose sole purpose it is to stay up! It's going to be out of the load balancer, so i'm hoping that without traffic it should be able to stay up for 24hrs. I'm going to monitor it to see.

Happy to attempt to write a PR for the above feature, if you like the sound of either of them as potential improvements.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. First clarify whether renewal should use a scheduled time or persisted renewal state, then identify the existing renewal interval and startup behavior. Done means the selected approach reliably triggers renewal when processes exit before the default 24-hour interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.