• Resolved dragonsway76

    (@dragonsway76)


    I can successfully connect to Redis 3 different ways according to the w3tc “test” function: 1.) tcp 2.) socket , and 3.) socket:0 all work.

    however whenever w3tc plugin is activated and I run –ANY– wp-cli command, the command is successfully executed however… in the moments that I am waiting for the command to execute, I literally get 1,000’s of

    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused
    Connection refused

    I am also not able to debug my site with w3tc activated because the debug.log file is generating endless connection refused messages and causes my debug log to grow GIGS in size…

    I regularly push and pull db’s between test, stage, and production.. I thought maybe there was info in a db table that was causing the issue, but w3tc doesn’t create any db tables… so I am stumped.

    W3TC says it is connected successfully but generates this issue… ??

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

    (@vmarko)

    Hello @dragonsway76

    Thank you for reaching out and I am happy to assist you with this.
    The PHP message: Connection refused suggests that there might be a problem with the Redis configuration. So you should check the Redis status?sudo systemctl status redis
    Also restart the Redis server?sudo systemctl restart redis?and try restarting your nginx server.
    Please make sure your host has PHP Redis enabled and installed.

    Create a PHP file with code:

    <?php 
    
    $redis = new Redis(); 
    $redis->connect('127.0.0.1', 6379); 
    $res = $redis->ping(); 
    echo $res;
    

    Once created, check the file in your browser and check the output.

    For the time being, also disable the feature in W3TC that is using Radis to avoid piling the error.log.

    Thread Starter dragonsway76

    (@dragonsway76)

    There is nothing wrong with my Redis installation. I run a nextcloud installation with 20+ users and a Roundcube Installation for 100+ people all using my redis installation.

    root@test:~# systemctl status redis
    ● redis-server.service – Advanced key-value store
    Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
    Active: active (running) since Mon 2022-12-26 20:30:53 HKT; 2h 2min ago
    Docs: https://redis.io/documentation,
    man:redis-server(1)
    Process: 1278 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
    Main PID: 1308 (redis-server)
    Tasks: 4 (limit: 7023)
    Memory: 56.8M
    CGroup: /system.slice/redis-server.service
    └─1308 /usr/bin/redis-server 127.0.0.1:0

    Warning: journal has been rotated since unit was started, output may be incomplete.

    First memcache doesn’t work for unknown reasons, now redis is throwing random bugs with “the” core tool wp-cli… this is not making me interested in upgrading. Your php snippet won’t work with my set up because I use index.php to protect the content of my directories.

    Any other suggestions? ??

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dragonsway76

    Thank you for your feedback. W3TC only recognizes the PHP extensions installed. Can you please confirm you have the PHP Redis extension installed?

    Thanks!

    Thread Starter dragonsway76

    (@dragonsway76)

    So I finally decided to cut my losses with your plugin and moved on… once i did that… I discovered that your plugin is FALSELY reporting successful connections to redis…

    This particular user was not in the unix group that has access to my redis socket…. However no matter what redis i config put in the GUI w3tc always reported a successful connection..

    every other plugin immediately noticed that major problem.

    then even after i corrected the problem and successfully tested the redis socket from command line… still generated “connection refused” errors…

    FYI your plugin also has a tendency to blank out the wp-config.php file as well… happened twice.

    happily I am no longer a user… good bye

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dragonsway76

    Thank you for the useful feedback, and I am sorry you feel this way.
    this being said, your feedback is helpful and we’ll strive to make more tests to avoid issues like this and offer the users more detailed explanations witin the plugin itself.
    I was not able to replicate this issue, as I was always able to connect with Redis
    W3 Total Cache supports Redis Unix socket. All you need to replace the default hostname with a Redis Unix socket (usually?/var/run/redis/redis.sock?or?/var/run/redis/redis.sock:0)

    As for the wp-config.php being blank because of the W3TC, this is also a new information and also something we should investigate and try to replciate.

    Once again, thank you for your feedback.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘W3TC Conflict With WP-CLi’ is closed to new replies.