icing / mod_md

Let's Encrypt (ACME) in Apache httpd
https://icing.github.io/mod_md/
Apache License 2.0
335 stars 27 forks source link

2.4.12 & 2.4.13 memory leak? #284

Closed nono303 closed 2 years ago

nono303 commented 2 years ago

Hi @icing, I've just noticed strange httpd memory usage (Windows - httpd 2.4.53 x64 vs17) with latest mod_md: image

1) 2.4.11 2) bump to 2.4.12 3) rollback to 2.4.11 4) bump to 2.4.13

Is there any major change that can imply a memory leak since 2.4.12? I'll try to provide additional information - if needed - but it will be Windows related....

icing commented 2 years ago

Hmm, the changes between 2.4.11 and 2.4.12 were related to the server-status information.

How many managed domains do you have?

nono303 commented 2 years ago

How many managed domains do you have?

20

icing commented 2 years ago

Do you monitor server-status regularly? or have you enabled it at all?

nono303 commented 2 years ago

Yes, i GET /server-status?auto every minute. I think the leak is not related to "other" httpd usage as i can't see correlation with busy workers image I just made a full dump of process but i'll have to find how to analyse it...

icing commented 2 years ago

Hmm, running some local test with a million requests to server-status and the memory of the process keeps increasing. Something smells...

icing commented 2 years ago

Think I found it. Was a wrong reference counting in the JSON code. That was triggered mainly by server-status.

I'll make a release soon for you to verify.

icing commented 2 years ago

Please give v2.4.14 a try.

nono303 commented 2 years ago

2022-04-26 16:32:36.220666 - - - md:info mod_md.c(874) pid:9000 tid:836 [AH10071: mod_md (v2.4.14-git), initializing...] we'll see tomorrow ;)

nono303 commented 2 years ago

image sounds good!

nono303 commented 2 years ago

image