Config Memcached

Config Memcached

by Dennis V -
Number of replies: 15

Hello, Ive read through the support forums and can't seem to find any answer to my questions.


I have memcached installed on my server, under installed cache stores, memcached is green checked.


I added an instance, and this is where I am a bit confused, for server, do I put in the server IP my moodle is installed, I tried that I do not get a green check mark, so im not sure its set up correctly.



Any Help would be great. Thank you

memcached screenshot

Average of ratings: -
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You put the IP or hostname of the memcached server. In production, that probably shouldn't be the same server as Moodle. However, if it is, then it's the same IP/hostname.
In reply to Howard Miller

Re: Config Memcached

by Dennis V -
thank you for your response, I did put that in my production, however, I still do not get the green check mark, as shown in the screenshot, I have confirmed I do have memcached installed on the server as well.
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you have the PHP extension (correctly) installed?
In reply to Howard Miller

Re: Config Memcached

by Dennis V -
Yes, I have confirmed it with my hosting provider and I do see the extension in WHM
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What is WHM? If you want to be certain go to...

Site administration > Server > PHP Info and search for memcached.
In reply to Howard Miller

Re: Config Memcached

by Dennis V -

Yes, Under that I see.

memcached supportenabled
Version 3.1.5

In reply to Dennis V

Re: Config Memcached

by Dennis V -
For Clarification, I do not have Memcached green checked under "Configured store instances"
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you actually configured an instance? I know... but I have to ask. Do you have a green tick in the "Installed cache instances section"? What settings have you chosen for your memcached instance?
In reply to Howard Miller

Re: Config Memcached

by Dennis V -

I did add an instance, I added the IP of my server, the options I have are in the screenshot.

In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you confirmed that memcached is really running? A simple check would be

telnet 162.241.139.139  11211
In reply to Howard Miller

Re: Config Memcached

by Dennis V -
When I run that command via terminal I get connection refused.
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In which case, your problem is that memcached isn't installed/running. I'm assuming that you didn't change the port from the standard 11211.

What's in /etc/memcached.conf?
In reply to Howard Miller

Re: Config Memcached

by Dennis V -
I did not, where would I go about doing this? 
In reply to Dennis V

Re: Config Memcached

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm not suggesting you should! But the telnet test assumes the default port (as will Moodle).
In reply to Dennis V

Re: Config Memcached

by Thorsten Bartel -
Picture of Core developers
Assuming you are on Ubuntu, please report the output of the following two commands:
systemctl status memcached.service
cat /etc/memcached.conf

The exact commands might differ depending on the release you are using.
If you do not know what these commands do or what to make of the information they provide, please get comfortable with Linux or ask somebody who is so to help you before doing anything yourself.
Average of ratings: Useful (1)