Can you send the output of a "stats" command on one of these overgrown
beanstalkd instances?
I'm trying to reproduce it here. I'm submitting one job per second
without deleting any. Does this resemble your use patterns? I'll let
it run overnight and see what happens.
kr
That's insane memory use, even on OS X. I just tested beanstalkd on OS
X 10.5 (with no updates; 32-bit) and libevent 1.4.8 stable, after
submitting about 1,500 jobs RSS is less than 600KiB.
Someone who sees this problem: can you give more details of which
version of Mac OS and libevent you're using? Are you running 64-bit?
Is anyone willing to run beanstalkd under valgrind (either memcheck or
massif)? That would be incredibly helpful, since I'm so far unable to
reproduce it.
kr
yeah, it seems like you are putting them in and taking them out.
you also seem to be calling stats-job. Is that the worker or the producer
doing that ?
what is your average/max job size ?
do you have binlog turned on ?
>> I have a couple of other small fixes too. github is down right now, but I
>> will push them as soon as I see it up.
>
> Great stuff. Looking forward to your fixes,
github is back and they are at
http://github.com/gbarr/beanstalkd/commits/memleak
Graham.
Hah, I fixed this one without even knowing it :-)
My commit to keep all_jobs_used consistent fixes the problem
http://github.com/gbarr/beanstalkd/commits/memleak
Graham.
That makes sense. The only "doubling" behavior in beanstalkd is when
the job hash table grows to accommodate more jobs at a time.
Decrementing all_jobs_used incorrectly caused it to become 2^32 - 1,
which caused the hash table to grow every time a job was inserted.
Thank you! I'll push this change to my master branch momentarily.
kr