Recent Topics

Redis setup not working



  • Hello everyone,

    I follow this instruction to enable Redis for my site, but it doesn't work, there is no message output on redis-cli monitor console.
    https://bagisto.com/en/redis-for-cache-management-for-bagisto/

    I am using v1.3.
    How could i know Bagisto is taking redis configuration? or is there any step which is not mentioned in document?

    Thank you.



  • Hi @bzero
    Please run
    php artisan config:cache after making the changes as mentioned in the article.
    then to check whether redis is working use this command and browse your website:-

    redis-cli monitor

    do let us know if you face any issues.



  • Hello @ayushwebkul

    I also tried this command, and this below as well, but redis-cli monitor gives nothing.
    php artisan optimize



  • @bzero
    please gives us the following details so that we can reproduce the issue on our end -

    1. Operating system
    2. Redis version
    3. Whether redis is running locally or on a different server?
    4. Server configurations (RAM, CPU). etc.

    Thanks!



  • Hi @ayushwebkul

    1. Operating system
    Debian 10
    

    Redis version:

    ii  libhiredis0.14:amd64            0.14.0-3                     amd64        minimalistic C client library for Redis
    ii  redis-server                    5:5.0.3-4+deb10u2            amd64        Persistent key-value database with network interface
    ii  redis-tools                     5:5.0.3-4+deb10u2            amd64        Persistent key-value database with network interface (client)
    

    Whether redis is running locally or on a different server?

    Local
    

    Server configurations (RAM, CPU). etc.

    Tested on two systems, 1- physical machine (i7, 8G ram)
    Another is on Vultr instance, 1G ram
    

    Thank you.



  • @bzero thanks for the information, we will get back to you soon after reproducing the issue on our end.



  • Hello @bzero

    1. We have checked your redis issue and redis is working fine on our end with this server configuration.

      • redis = 5.0.3
      • RAM = 2GB
      • OS = ubuntu 18.04LTS (Debian)
    2. We recommend to use redis as both CACHE_DRIVER as well as SESSION_DRIVER for bagisto, therefore you need to modify your .env accordingly setting CACHE_DRIVER = redis, SESSION_DRIVER= redis

    3. After any modification in .env, remove <bagisto_root>/bootstrap/cache/config.php file and then flush the bagisto previous configuration, cache and route by "php artisan config:cache", "php artisan cache:clear", "php artisan route:clear".

    4. Also check for the predis is installed properly by composer if not then run "composer require predis/predis" in bagisto root directory.

    Thanks and Regards



  • Great. Thanks for this instruction.
    I will update you for the result soon.


Log in to reply