single object size limit

Brad Fitzpatrick brad at danga.com
Tue Jan 10 17:47:17 UTC 2006


On Tue, 10 Jan 2006, Jon Drukman wrote:

> Jon Drukman wrote:
> > Antony Dovgal wrote:
> >> Brad, could you please comment this?
> >> I can reproduce it easily increasing the size of the item.
> >> And memcached's reply "SERVER_ERROR out of memory" doesn't look like
> >> something expected in this case.
> >> Or is it?
> >
> > this is super timely.  i just got bit by the exact same problem.
> >
> > set get_ratings_by_item:2f62964ab0972 1 1134428488 1308636
> > SERVER_ERROR out of memory
> >
> > it doesn't even wait for you to start sending the data.
....
>
> anybody got any ideas about this?  i tried out brad's recently posted
> "prealloc slabs" patch but it doesn't fix this.

The maximum object size is a few bytes under 1MB.  You're trying to set
about 250k more than it can take.

You can recompile memcached with a higher POWER_LARGEST if you need more
than 1MB.  It's in slabs.c at the top.  Make it 21 to get 2MB max, or 22
for 4MB max, etc.

- Brad



More information about the memcached mailing list