Open iammeken opened 2 years ago
It seems reload hitch will somehow read all certificates into memory and then never released it.
~ 6k bytes per certificate * 6400 (certificate) = 380M
So every reload will add 380M to memory.
Will you check it?
Hi.
Do you have plots of memory consumption over time?
On a reload, Hitch will launch a new set of worker processes while draining the old generation. So it is expected that there will be a period with significantly increased memory consumption - this should however go back down after the previous gen worker processes are drained of traffic and retire.
Could I ask you to monitor the number of total hitch processes running when you see this, and also see if the usage drops after they are cleaned up?
With htop, I can only see only one hitch process, nearly 99.9% during first few seconds, then it drops.
The memory also increase a lot in first a few seconds, then stable at 0.3G increase.
And first reload will always doubles the memory, then next reload will increase 0.3-0.4G increase.
I have seen it in many ubuntu.
Perhaps it always exists, you can see it when you have thousands of certs.
I bear it for years. :)
Same machine, with wildcard certs (acme.sh), the first reload will double memory. with normal ssl (certbot, www and @), the first reload only increase a little.
Interesting ...
And certbot ssl certs are bigger than wildcard ssl in file size.
It is caused by Automatic OCSP staple retrieval.
I have to switch off Automatic OCSP staple retrieval by:
ocsp-dir = ""
It is caused by Automatic OCSP staple retrieval.
I have to switch off Automatic OCSP staple retrieval by:
ocsp-dir = ""
Will you update hitch version to fix this bug?
Hello,
Ubuntu 22.04/20.04 hitch 1.73/1.71 12 workers 6500+ LETS ssl certs
service hitch reload: First reload will always double hitch memory used: from 3.1 to 6.5G next reload will increase ~ 400M each
I have tried several adjustments in hitch: with or without session, with or without ocsp.