Troubleshooting memcached

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation
Koha > Technical
Tips & Tricks > Tips & Tricks/Customising Notices and Slips > Tips & Tricks > Troubleshooting

Is memcached working?

If memcache has been enabled, is there a way to test to be sure Koha is using it? What can I look for?

You can use the memdump/memcdump tool from the libmemcached command-line utilities and see if there are any keys from Koha in. On Debian based distros the comand memcdump can be installed using "sudo apt-get install libmemcached-tools".

Here's an example from a development system:

$ memcdump --servers localhost

(Based on a question from Tom Hanstra and an answer from Galen Charlton, on the main Koha mailing list.)

Is memcached working 2?

Try this:

echo "stats items" | nc 11211

This should give output like this:

   STAT items:1:number 1
   STAT items:1:age 66
   STAT items:1:evicted 0
   STAT items:1:evicted_nonzero 0
   STAT items:1:evicted_time 0
   STAT items:1:outofmemory 0
   STAT items:1:tailrepairs 0
   STAT items:1:reclaimed 0
   STAT items:1:expired_unfetched 0
   STAT items:1:evicted_unfetched 0
   STAT items:1:crawler_reclaimed 0
   STAT items:1:lrutail_reflocked 0
   STAT items:6:number 18
   STAT items:6:age 673
   STAT items:6:evicted 0
   STAT items:6:evicted_nonzero 0

You can use the number after "items:" to dig deeper:

echo "stats cachedump 1 100" | nc 11211

External links

Personal tools