Using membase for session management in PHP
Hi,
we recently migrated our PHP website to use a Membase bucket (on 5 nodes) for Session handeling.
We allocated 1.5GB memory to this bucket ( 5*1.5GB ) and as soon as we hit 90% usage in the bucket, then our users can't login anymore in the application. As soon as we allocate more memory, then everything is working perfectly again. There are very few writes going to the disk. 250 ops/sec and 5 disk fetches / second also.
We don't see any errors, so we have no clue what the exact problem is.
Does someone have a golden tip to help us?
Thanks,
Sven
While the licensing costs per node is hard to swallow I noticed that they do offer hour and daily consulting services: http://www.couchbase.com/products-and-services/couchbase-services Although I'm not sure if they would be able to help with your issue.
hi there,
For a membase bucket this is a bit odd. The default behavior is generally:
- hit low water mark - replica data ejected from ram
- hit high water mark - active data ejected from ram
It will only eject data that has already been persisted to disk - if that ejected value is requested by the app server again, membase will have to fetch it from disk and load it into memory before it can service that request - it does not mean that the key is missing.
I would add more memory to your cluster if you can so that you can get this below the low water mark for memory. You can use the command below to see exactly where you are at:
/opt/membase/bin/mbstats localhost:11210 all | egrep "mem_used|ep_mem_"
ep_mem_high_wat: 24366022656
ep_mem_low_wat: 19492818124
mem_used: 19533370797
note that this is a node specific command.
hope this helps
-Alex.
As soon as we fill 1 Membase bucket to 90% == no errors. One catch: you can't write anymore to your membase bucket. No errors what so ever. This makes troubleshooting very difficult. I would suspect that Membase starts writing to disk automatically when the high watermark is being hit. This isn't the case.
I've waited a couple of days here to see if I could get some limited support or at least 1 golden tip to get us on the right track, but no help... Paying 5*2500 for 1 support ticket is a bit too expensive for me.