• Resolved Carsten Lund

    (@carsten-lund)


    Hi there, this is not directly a plugin question but a general question to Redis server installation and how to maintain Redis on the server. Documentation from the Redis community is at a very high level and requires in debt knowledge how to manage Redis through SSH, which can go very wrong if you don’t know what you are doing. Therefor I think this topic will be of interest to many Redis users.

    I installed Redis on my VPS server through this and it is working fine:
    https://redis.io/docs/getting-started/installation/install-redis-from-source/

    1. How do you update Redis on the server and change max memory, PHP when this is updated, and when do you know when there are updates, and time to update Redis?
    I guess there are SSH prompts for this, but as said, if you are not experienced in using SSH, this can go very wrong.

    I started installing Redis through Docker on Plesk, which is easy and probably easy to update. But I Read that the best way to install was through SSH.
    Here there are different ways of installing which is very confusing.
    https://redis.io/docs/getting-started/installation/install-redis-from-source/
    https://redis.io/docs/getting-started/

    2. What is your recommendation on installing Redis on the server, through Docker or SSH, and which documentation to follow?

    3. If I decide to change to Redis installation through Docker, for convenince can you provide some easy to understand documentation on, how to remove the existing Redis installation on my server?

    Thanks!


Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for reaching out and I am happy to help.
    W3 Total Cache recogizes the Php extension so the important thing is to install phpredis in order to be able to use it via W3 Total Cache.

    • Make sure that the redis server is accessible from the web application servers
      • Redis installation instructions: https://redis.io/topics/quickstart
      • If installing redis on a dedicated server, make sure that the web application servers have access to TCP Port 6379
      • Add the following at the end of your?/etc/redis/redis.conf?config filemaxmemory 2048mb # This should be 50% of your available RAM in the node maxmemory-policy allkeys-lru

    You can also check these installation instructions if you find it easier,

    and for the memory change please check this link for more details.

    I hope this helps!

    Thread Starter Carsten Lund

    (@carsten-lund)

    Thanks for your answers and links. Its getting a bit too complicated I think, so I’m considering installing Redis trough an image in Docker instead, where I can update and change memory though panel settings instead.

    Do you have a link or a command for uninstalling the existing Redis installation from server through SSH first?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for your feedback.
    Please check this link for more information on how to uninstall redis using the command line.

    Thanks!

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Marko, thank you very much, I haven’t been able to find this usefull information.

    One more question. I activated object cache in W3TC, and the test passed: Redis hostname:port / IP:port: 127.0.0.1:6379

    But if I check the Query Monitor, there is no object caching?

    Regards

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    I am guessing that you are checking this while looged in?

    Can you please share your website URl?

    Thanks!

    Thread Starter Carsten Lund

    (@carsten-lund)

    muii.dk

    I’m attempting to remove the server, with no luck, but I must admit that I don’t know what I’m doing ??

    :~/redis-stable# sudo apt-get purge --auto-remove redis-server
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package 'redis-server' is not installed, so not removed
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    :~/redis-stable#  sudo rm /etc/redis/redis.conf
    rm: cannot remove '/etc/redis/redis.conf': No such file or directory
    • This reply was modified 1 year, 9 months ago by Carsten Lund.
    • This reply was modified 1 year, 9 months ago by Carsten Lund.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    can you please shwhich hosting provider you are hosing the website on- which platform you are using?

    Thanks

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hello, it’s a VPS S NVMe server on Contabo, OS Ubuntu 20.04.5 LTS

    Thread Starter Carsten Lund

    (@carsten-lund)

    Apparently it should be uninstalled, but I’m not able to run the Redis image from Docker.

    ~# apt-cache policy redis-server
    redis-server:
      Installed: (none)
      Candidate: 5:5.0.7-2ubuntu0.1
      Version table:
         5:5.0.7-2ubuntu0.1 500
            500 https://asi-fs-d.contabo.net/ubuntu focal-updates/universe amd64 Packages
            500 https://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages
         5:5.0.7-2 500
            500 https://asi-fs-d.contabo.net/ubuntu focal/universe amd64 Packages
      
    
    Thread Starter Carsten Lund

    (@carsten-lund)

    If I use Automatic port mapping: Object caching via redis is currently enabled

    But if I choose Manual mapping?6379?to external?6379, I receive the address already in use error, so apperantly not all of the old Redis installation has been removed from server.

    {“message”:”driver failed programming external connectivity on endpoint redis (2151b9d53ad0df37ccf5369ad19c153760e32bd7f57ede713211c4edc2ffce5a): Error starting userland proxy: listen tcp4 0.0.0.0:6379: bind: address already in use”}

    Should port 6379 always be used?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for your feedback. Have you tried checking this with your hosting support (This is not directly related to the W3 Total Cache)

    Also, are you still using the Redis Object Cache plugin for this?

    Thanks!

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi Marco, thanks for helping out, though I know it’s not in the scope for W3TC.

    Apparently it is working now, when I stop the Redis container in Docker, the status in the plugin is “not connected”, so I guess that means that it is the Redis image which is in use, not the manually installed version anymore.

    Thanks

    • This reply was modified 1 year, 9 months ago by Carsten Lund.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for your feedback.

    Yes, it appears so since the W3 Total cache only recognizes the PHP extension of the module.

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Recommended Redis installation, manage and maintain Redis through SSH’ is closed to new replies.