-
Notifications
You must be signed in to change notification settings - Fork 34
bud leaks memory #97
Comments
Wow! Were there any leaks before the latest patches? |
I honestly have no idea, I saw this 2 days ago and started collecting some data. Here you can see the VM size graphed for the last 2 days. "ares" is just idling and doesn't handle any real traffic, zeus takes the most part of prod traffic and hera the rest. You can see that more traffic makes it grow faster: http://i.imgur.com/9DPfijV.png I have checked the derivative (change over time, basically allocated/freed per second), too, and it is mostly allocations: http://i.imgur.com/AWgVHrt.png It looks like there are large blocks that get allocated (~6-8 MiB) that look like reponse or request bodies, but such large amounts never get free'd, only small. The core dump I got from the other segfauklt is 2 GB sin size. That could be a potential starting point for looking, what kind of memory is allocated. I will see if I can dig around a bit. Maybe you have an idea where this could occur? SNI again? ;-) |
I have now run bud with valgrind and got some results. It looks like mostly it's the certificates that leak memory:
Another one points in the same direction:
Is it possible that certificates that have been loaded via HTTP are not freed after the request has ended? |
Should be fixed in 4.0.25, please give it a try! Fixed by: b93b897 |
(Sorry for delay, I was on a conference and the internet was spotty) |
Nice job, thanks! I had thought the problem would lie somewhere else entirely! I'll report the new results in a few days! |
Thank you! |
It is still leaking ~70 megs of memory in 24 hours (x 30 days => 2.1 Gigs), but not nearly as fast as before. I don't want to waste your time, but to me this seems like something that is still worth looking into... I thought the client.c:67 might be worth a shot, but I couldn't find an obvious case where it should be free'd and is not, I'm just not familiar enough with the code :-( |
Ah, screenshot, If you like: https://i.imgur.com/gMjSCKr.png |
Sorry, @phillipp ! At least we have more time for this now :) Will take a look at it soon. |
Ah, no worries! We have used bud for at least one year now and we are so, so happy! I really appreciate all your work! Von: Fedor IndutnyGesendet: Freitag, 9. Dezember 2016 19:18An: indutny/budAntwort an: indutny/budCc: phillipp; MentionBetreff: Re: [indutny/bud] bud leaks memory (#97)Sorry, @phillipp ! At least we have more time for this now :) Will take a look at it soon.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/indutny/bud","title":"indutny/bud","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/indutny/bud"}},"updates":{"snippets":[{"icon":"PERSON","message":"@indutny in #97: Sorry, @phillipp ! At least we have more time for this now :) Will take a look at it soon."}],"action":{"name":"View Issue","url":"#97 (comment)"}}}
|
@phillipp thanks for kind words! Just pushed the commit that should fix the leak, please give it a try 😉 (bud@4.0.26) |
Nice, I'll give it a spin! |
Howdy,
I have just noticed that bud heavily leaks memory in our setup.
We had 4 workers running and each of them consumed ~5.7 GB of memory after running for around 7 days. I've now started to collectd memory usage data and will report my findings but wanted to give some advance notice.
Edit: This is what the memory usage looks like when bud is restarted: http://i.imgur.com/nWERbLm.png
The text was updated successfully, but these errors were encountered: