Jump to content

Enabling memcached in 1.4


Recommended Posts

Hi,

I’m trying to enable memcached under Back Office > Preferences > Performance

I had my host install memcached, and now I don’t have the warning that memcached isn’t installed anymore

Right now under the settings I have: “Use Cache=Yes”, “Caching system=memcached”

I don’t have any server added, do I have to add a server for it to work?
If the server is local, do I need to put 127.0.0.1 in the IP address? or maybe localhost?

Thanks in advance

Link to comment
Share on other sites

  • 3 months later...

Hi,

I'm curious about this too...

We just installed memcache on our server, and now need to know if we need to "Add a Server" to fully implement this feature. After installing memcache, and enabling the cache option... what else needs to be done/setup??

Thanks!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hi,<br/><br/>I'm curious about this too...<br/><br/>We just installed memcache on our server, and now need to know if we need to "Add a Server" to fully implement this feature. After installing memcache, and enabling the cache option... what else needs to be done/setup??<br/><br/>Thanks!

 

Hi Mytheory

Did you manage to acheive your objective? I'm trying to install memcache and also I'm curious as to what else needs to be done. Did you find a step by step guide?

Thanks,

Matt

Link to comment
Share on other sites

Hi,<br/><br/>I'm curious about this too...<br/><br/>We just installed memcache on our server, and now need to know if we need to "Add a Server" to fully implement this feature. After installing memcache, and enabling the cache option... what else needs to be done/setup??<br/><br/>Thanks!

 

Hi Mytheory

Did you manage to acheive your objective? I'm trying to install memcache and also I'm curious as to what else needs to be done. Did you find a step by step guide?

Thanks,

Matt

Link to comment
Share on other sites

Hi,

 

Sorry for the late reply... just realized I haven't been receiving updates since the new forum update.

 

Anyways, NO, I still have not found a definitive guide; however, I have successfully installed the memcached extension and have it enabled.

 

We run a debian server so we used: apt-get install memcached

 

Supposedly, memcache and memcached are different. I don't remember exactly which one we had to install to get it to work, but if I remember correctly one of them did not work. I'm pretty sure we used 'memcached.'

 

Then I enabled the cache option via the BO and selected the memcache from the drop down list. Originally, we used added a server using the localhost IP address, but some items in the BO wouldn't immediately update until we logged out and back in.

 

Then we had it set to our server's external IP address, everything seemed to work fine. However, thinking about it I thought this would create an extra step... since the memcache server is the same one by adding a server we figured it would have to redirect, creating an extra step. This has not been tested or confirmed, just our way of thinking.

 

Now, we have no servers that have been added. Just the option has been enabled. We haven't noticed any difference from when we added a server using our external IP.

 

Anyways, we have not found a guide or a way to fully understand if how we have it setup is actually the correct way. We would very much like to see a guide explaining proper setup of this feature from the DEVs. However, everything seems to be working fine so this is how we have it until more advice can be given.

 

HTH!

Link to comment
Share on other sites

Assuming you have memcached installed, and you did not make changes to its default setting, at the minimum add a server with IP 127.0.0.1. Use the prefilled port (it's default) and weight (not relevant if you are running only one memcached instance on one server)

 

Bad news is that in latest SVN version there is a problem with adding servers, you version may or may not have this problem.

 

Make sure you read security considerations of running mamcached on your server (maybe this should be added as a note to PS interface).

Link to comment
Share on other sites

Hi,

 

Sorry for the late reply... just realized I haven't been receiving updates since the new forum update.

 

Anyways, NO, I still have not found a definitive guide; however, I have successfully installed the memcached extension and have it enabled.

 

We run a debian server so we used: apt-get install memcached

 

Supposedly, memcache and memcached are different. I don't remember exactly which one we had to install to get it to work, but if I remember correctly one of them did not work. I'm pretty sure we used 'memcached.'

 

Then I enabled the cache option via the BO and selected the memcache from the drop down list. Originally, we used added a server using the localhost IP address, but some items in the BO wouldn't immediately update until we logged out and back in.

 

Then we had it set to our server's external IP address, everything seemed to work fine. However, thinking about it I thought this would create an extra step... since the memcache server is the same one by adding a server we figured it would have to redirect, creating an extra step. This has not been tested or confirmed, just our way of thinking.

 

Now, we have no servers that have been added. Just the option has been enabled. We haven't noticed any difference from when we added a server using our external IP.

 

Anyways, we have not found a guide or a way to fully understand if how we have it setup is actually the correct way. We would very much like to see a guide explaining proper setup of this feature from the DEVs. However, everything seems to be working fine so this is how we have it until more advice can be given.

 

HTH!

 

Hi Mytheory

Thank you so much for your detailed reply. You've been a massive help. If I do find a guide I'll post it here.

All the best,

Matt

Link to comment
Share on other sites

  • 2 weeks later...

Assuming you have memcached installed, and you did not make changes to its default setting, at the minimum add a server with IP 127.0.0.1. Use the prefilled port (it's default) and weight (not relevant if you are running only one memcached instance on one server)

 

Bad news is that in latest SVN version there is a problem with adding servers, you version may or may not have this problem.

 

Make sure you read security considerations of running mamcached on your server (maybe this should be added as a note to PS interface).

 

Hi,

 

Thanks for your insight... trying to get as much information about this feature as I can esp. with the limited resources out there.

 

We do have memcached installed with its default settings (nothing was changed). However, the problem with adding a server with 127.0.0.1 as the IP address was that product information would NOT update immediately. Like the quantities for attributes would not update, well they do, but to see the changes we had to log out and back in. However, when we changed it to our server's external IP it worked fine. However, at the moment we have no servers added since the memcached server is on the same server... adding the external IP just seemed repetitive.

 

Thanks again!

Link to comment
Share on other sites

Check the memcached settings to see what interface and port it is listening on and how it is started It is never a good idea to expose memcached to external IP. The following is from the memcached wiki;

 

By default memcached listens on TCP and UDP ports, both 11211. -l allows you to bind to specific interfaces or IP addresses. Memcached does not spend much, if any, effort in ensuring its defensibility from random internet connections. So you must not expose memcached directly to the internet, or otherwise any untrusted users. Using SASL authentication here helps, but should not be totally trusted.

 

but to see the changes we had to log out and back in

 

This may be due to Prestashops own caching too. Try 127.0.0.1 with memcached turned on but prestashop's own performance tweaks, (cache, force compile etc) turned off

Link to comment
Share on other sites

  • 9 months later...

Hello phrasespot

 

Im having quite an issue to activate memcache... by hosting co said its already installed, I added de 127.0.0.1 server, but when i sellect memcached and click on save, there is some PS internal error, because the next page only shows the 'tabs' from the BO but nothing else...

 

any clues?

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

I am using ps 1.4.7.3 and enabling memcached causes some problems , for instance, in the modules page, when I click configure(specifically this module: onepagecheckout) instead of taking me to the configuration page it displays the message "module successfully uninstalled", to be able to configure the module I have to disable memcache , but something to take into account is that if I do not add any server (just enable memcached) those erros I mentioned does not occur .

anybody knows if these bugs were solved in newer versions of ps ?

Edited by ezakimak (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Hi

 

Just wanted to add to this thread, iam using 1.4.11 with memcached, just leave the smarty cache disabled when you enable memcached. This will fix your problems like module disabled or uninstalled etc. Later you can enable the smarty cache back again.

 

Also, use the settings when you add server :

 

I.P 127.0.0.1

 

and rest is default settings. This is when you use memcached on same server.

 

Adding a server is important, because memcached wont work if your application isnt programmed to work with it. It will just sit there hogging memory. Those of you on a VPS, you can see memcached in action with htop command.

 

Special thanks to user Phrasespot for his input.

Edited by indus (see edit history)
Link to comment
Share on other sites

  • 5 months later...

I'm a bit confused.

Confusions :

 

#1 Do I need to install both memcached and memcache PECl extenstion or any one of them or anyone specific ?

 

#2 What IP shall I put while adding server in the Adavance Prameter > Performance > Caching (if memcache enabled) ?

 

#3 When the memcache is integrated successfully where does it saves the cached file 

 

Some one please clarify all these thing to me. I' using PS 1.5.5

Link to comment
Share on other sites

http://naveensnayak.wordpress.com/2013/07/24/installing-memcached-on-ubuntu/

 

Follow that tutorial, for prestashop you have to install memcache, instead of memcached. which comes from the package php5-memcache on ubuntu. There are two packages, one is php5-memcache, and the other one is php5-memcached with a d at the end.

 

The I.P is 127.0.0.1 and also, remember to disable prestashop's own cache system when using it. Frankly though, i will stay away from memcached, it doesnt really work well with prestashop. Its bugged. Its even worse in 1.5 version.

Edited by indus (see edit history)
Link to comment
Share on other sites

Thank you for the reply. I think you suggested me to use memcache as an external feature on my server not integrated with the Prestashop's default caching, but I wanted to know about the default caching system the parameters available under caching. Though your reply is very much helpful still I want to know about the feature available in the prestashop by default. Any suggestion ? 

 

 

 

if I use the prestashop's default memcache by installing PECL extension, do I need to install the library ?

Edited by J.Sahu (see edit history)
Link to comment
Share on other sites

I have answered as per your question. Once you install the memcache extension, you enable it in the prestashop back office so that it makes use of memcache. You need a VPS or dedicated server to use memcache though. Its mostly not available on shared hosting.

 

Memcached saves data in memory and depending on how much is allocated to it, it will keep clearing the data and adding new things to it depending on what is frequently requested by the server. Iam not an expert though, so i cant explain it in any more detail. Its basically just like any cache system, except that memcache is what its name stands for, a distributed memory cache system., so instead of using a hard drive to store data, it saves and loads it from memory which is much faster.

 

Memcache has a lot of configuration options but i have never used them except allocating RAM to 64 MB and some basic settings.

 

To answer your last question, prestashop does not have its own memcache, it just makes use of what is installed on your server. Because, just installing memcache wont be useful if your application is not coded to make use of memcache.

Edited by indus (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...