Problem enabling memcached.

Ah, so it sounds like there are two installs - one of the program and one of the php part. I think maybe I only did the second part - I will go through your example and tests and see what is up.

Thanks!
 
Well, dang, I'm about 1/2 way through that list and it's working!

I still have to do all the startup and config stuff....

THANKS!

BTW, I think it would be great for someone to write out the basics in plain English - maybe separated from the actual code - for instance clearly explain that memcache and memcached are different things and that a program AND a php module must both be installed, as well as startup info for both (if that is the case)....

I'm a bit of a simpleton, so like those "steps" written out.....like

1. In order to use this in XF, you must have both a program and a php module installed. Before you start installing, check to see if you have either of these installed in this fashion: blah, blah.

2. If not, then........blah, blah....
:)

I didn't have anything on my server relating to file or directory names of memcache or memcached.

It's really easy for newbie to be confused by memcache and memcached being two different things (??if they are).
 
If your on centos then

Code:
yum install memcached php-pecl-memcache

Should do it all for you :D
 
  • Like
Reactions: Xon
If your on centos then

Code:
yum install memcached php-pecl-memcache

Should do it all for you :D
My yum can't find anything for memcache / memcached, which is why I had to install it all manually.

Code:
# sudo yum list memcached 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * extras: mirror.sov.uk.goscomb.net
 * rpmforge: www.mirrorservice.org
 * updates: mirror.sov.uk.goscomb.net
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list
 
My yum can't find anything for memcache / memcached, which is why I had to install it all manually.

Code:
# sudo yum list memcached
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* extras: mirror.sov.uk.goscomb.net
* rpmforge: www.mirrorservice.org
* updates: mirror.sov.uk.goscomb.net
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list

Hmm, centos 5 or 6?
 
Centos 6

Code:
# yum search memcache
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
============================ N/S Matched: memcache =============================
libmemcached.i686 : Client library and command line tools for memcached server
libmemcached.x86_64 : Client library and command line tools for memcached server
libmemcached-devel.i686 : Header files and development libraries for
                        : libmemcached
libmemcached-devel.x86_64 : Header files and development libraries for
                          : libmemcached
memcached-devel.i686 : Files needed for development using memcached protocol
memcached-devel.x86_64 : Files needed for development using memcached protocol
perl-Cache-Memcached.noarch : Perl client for memcached
php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon
python-memcached.noarch : A Python memcached client library
memcached.x86_64 : High Performance, Distributed Memory Object Cache
 
  Name and summary matches only, use "search all" for everything.

Centos 5

Code:
============================== Matched: memcache ===============================
libmemcached.i386 : Client library and command line tools for memcached server
libmemcached.x86_64 : Client library and command line tools for memcached server
libmemcached-devel.i386 : Header files and development libraries for
                        : libmemcached
libmemcached-devel.x86_64 : Header files and development libraries for
                          : libmemcached
memcached.x86_64 : High Performance, Distributed Memory Object Cache
memcached-devel.x86_64 : Files needed for development using memcached protocol
memcached-devel.i386 : Files needed for development using memcached protocol
perl-Cache-Memcached.noarch : Perl client for memcached
php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon
php-pecl-memcached.x86_64 : Extension to work with the Memcached caching daemon
python-memcached.noarch : A Python memcached client library
python-shove.noarch : Common object storage frontend
redis.x86_64 : A persistent key-value database
rubygem-moneta.noarch : A unified interface to key/value stores
 
Hmm, centos 5 or 6?
CentOS5 for me on both servers.

Using these repositories

Code:
-rw-r--r--  1 root root 1.9K Feb 25 08:20 CentOS-Base.repo
-rw-r--r--  1 root root  631 Feb 25 08:20 CentOS-Debuginfo.repo
-rw-r--r--  1 root root  626 Feb 25 08:20 CentOS-Media.repo
-rw-r--r--  1 root root 6.0K Feb 25 08:20 CentOS-Vault.repo
-rw-r--r--  1 root root  267 Dec 16  2009 Percona.repo
-rw-r--r--  1 root root  739 Nov 13  2010 mirrors-rpmforge
-rw-r--r--  1 root root  717 Nov 13  2010 mirrors-rpmforge-extras
-rw-r--r--  1 root root  728 Nov 13  2010 mirrors-rpmforge-testing
-rw-r--r--  1 root root 1.1K Nov 13  2010 rpmforge.repo

Code:
Finished
======================================================== Matched: memcache =========================================================
libmemcache.x86_64 : A client library for memcached
libmemcache-devel.x86_64 : Header files, libraries and development documentation for libmemcache
lighttpd.x86_64 : Lightning fast webserver with light system requirements
python-memcached.noarch : Python interface to the memcached memory cache daemon
python-openid.noarch : Python OpenID libraries
 
Ah ha! Found it in yum. I needed to enable rpmforge extras.

Code:
sudo yum search --enablerepo=rpmforge-extras memcached
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * extras: mirror.sov.uk.goscomb.net
 * rpmforge: www.mirrorservice.org
 * rpmforge-extras: www.mirrorservice.org
 * updates: mirror.sov.uk.goscomb.net
rpmforge-extras                                                                                              | 1.9 kB     00:00     
rpmforge-extras/primary_db                                                                                   | 181 kB     00:00     
Excluding Packages in global exclude list
Finished
======================================================== Matched: memcached ========================================================
libmemcache.x86_64 : A client library for memcached
memcached.x86_64 : Distributed memory object caching system
memcached-devel.x86_64 : Header files for memcached
python-memcached.noarch : Python interface to the memcached memory cache daemon
python-openid.noarch : Python OpenID libraries

Although on my primary server, I don't have rpmforge enabled, as I try and keep everything within Cpanel to avoid any possible conflicts.
 
So is there an amount of memory to allow which makes sense based on db size in XF?

Or at least roughly?
 
I have mine set to 1GB and am currently using 314MB - it builds slowly so let it run for a few weeks and then check the size. (y)
 
I have mine set to 1GB and am currently using 314MB - it builds slowly so let it run for a few weeks and then check the size. (y)

Do you think there is a big penalty for it being undersized? It would seem to be that it might just expire some items in an intelligent fashion and load up the newer ones...something which is obviously needed with a forum?

As you can probably tell, I have absolutely no idea if this is how it works - rather it's how I would want it to work! Is anyone familiar with the details?
 
No, I don't think there's a penalty for having a lower value, it should expire the oldest items to make way for newer ones as it needs to; but if you've got a reasonable amount of RAM in your box you could set it at 512MB, 256MB or 128MB and monitor how it goes (it'll only use what it needs anyway, so doesn't instantly create a full-sized memory footprint). (y)
 
Question, I see memcache and memcached mixed together in the above instructions - are they both required? I was under the impression that they were 2 different things caching systems.
 
Question, I see memcache and memcached mixed together in the above instructions - are they both required? I was under the impression that they were 2 different things caching systems.
These are also two similar PHP extensions for Memcache: http://pecl.php.net/package-search.php?pkg_name=memcache&bool=AND&submit=Search. Zend_Cache_Backend_Memcached requires the memcache extension.

Edit: I think you were talking rather the difference between the server and Memcached extension; Clickfinity posts a very good answer below.
 
Memecached is the caching server software that is installed on your physical server. Memcache is the PHP module that interfaces with Memcached server. (y)
 
Top Bottom