Weird "SERVER_ERROR out of memory"

Brad Fitzpatrick brad@danga.com
Wed, 7 Apr 2004 14:29:00 -0700 (PDT)


The key length is limited only to 250 characters, iirc.  It's documented.

The problem you're hitting is that you're only allocating 1MB of memory to
memcached, and it requires 1MB per size class.

There are size classes 64 bytes (2**6) to 1MB (2**20), so anything less
than 15MB doesn't really work.  Maybe we should make that an error.

- Brad


On Wed, 7 Apr 2004, Stephane Legrand wrote:

> Hello,
>
> I can't understand why i get a "SERVER_ERROR out of memory" with
> this kind of session:
>
> * Client side:
>
>   bash$ telnet 127.0.0.1 50000
>   Trying 127.0.0.1...
>   Connected to localhost...
>   Escape character is '^]'.
>   add COUNTCALL 0 0 1
>   0
>   STORED
>   incr COUNTCALL 1
>   1
>   get 0796e8fd5ba9c55794fbd8407617ef51
>   END
>   set 0796e8fd5ba9c55794fbd8407617ef51 0 3600 14
>   SERVER_ERROR out of memory
>
> * Server side:
>
>   bash$ memcached -p 50000 -m 1 -vv
>   <3 server listening
>   <5 new client connection
>   <5 add COUNTCALL 0 0 1
>   >5 STORED
>   <5 incr COUNTCALL 1
>   >5 1
>   <5 get 0796e8fd5ba9c55794fbd8407617ef51
>   >5 END
>   <5 set 0796e8fd5ba9c55794fbd8407617ef51 0 3600 14
>   >5 SERVER_ERROR out of memory
>
>
> The weird thing is that if i use for instance a "XYZ" key instead
> of the "0796e8fd5ba9c55794fbd8407617ef51" key, everything is ok:
>
> * Summary of the client side:
>   ...
>   Escape character is '^]'.
>   add COUNTCALL 0 0 1
>   0
>   STORED
>   incr COUNTCALL 1
>   1
>   get XYZ
>   END
>   set XYZ 0 3600 14
>   AZERTYUIOPQSDF
>   STORED
>
>
> Does that mean that there are some (not documented ?) constraints
> on the keys length ? My operating system is FreeBSD 4.9 -stable,
> memcached is version 1.1.10.
>
> Any help will be really appreciated.
>
>
> Regards,
> Stephane.
>
> --
> Je recherche un emploi de d=E9veloppeur/admin. sys.
>  (FreeBSD,Linux,PHP,Perl,MySQL,OCaml,Tcl/Tk...)
>   =3D=3D> www.freebsd-fr.org/~stephane/cv.pdf <=3D=3D
>
>