Solve memcached servers are not responding or not running

have learningWordPress websitenewbie inWordPress backendThe W3 Total Cache plugin is installed, but Memcached is unresponsive and doesn't work as usual with the following notification:

The following memcached servers are not responding or not running:
Database Cache: 127.0.0.1:11211.
Object Cache: 127.0.0.1:11211.
Page Cache: 127.0.0.1:11211.
This message will automatically disappear once the issue is resolved

By running the command "systemctl restart memcached"When restarting the memcached service, the problem went away for a while, but then reappeared.

Compatibility testing has been done and everything seems to be fine:

Memcached extension: Installed
Memcache extension: Not Installed
Redis extension: Not Installed

What should I do to solve the problem that the Memcached service cannot run as usual?

Solution XNUMX for Memcached service not responding

There appears to be some kind of connectivity issue with the Memcached service.So the problem is with the Memcached server.

Please check WordPress pluginSettings and Memcached configuration.

The message you received is the result of a problem with the Memcached server.

If the problem goes away after restarting the Memcached service, there may be some connectivity issues with the Memcached server.

Check in CLI/SSH Memcached  Service▼

memcached-tool 127.0.0.1:11211 display 
memcached-tool 127.0.0.1:11211 stats
telnet 127.0.0.1 11211
  • Should communicate with memcache and respond to status commands.

Check if the service is running ▼

ps afux | grep memc

If needed, restart the memcache service (as root/sudo)▼

service memcached restart

If an error message appears " ERROR Too many open connections"That's what caused the problem.

When you reach the Memcached open connections limit, you will no longer be able to store or retrieve any sessions from that point on, as old connections won't go away.

There are two possible fixes:

  1. Disable persistent connection in the W3 Total Cache plugin module (eg: Performance → Object Cache → Advanced)
    Solve memcached servers are not responding or not running
  2. Increase the open connections limit in the memcache configuration, set the maximum open connections.

Solution XNUMX for the Memcached service not running

if yourLinuxserver useCWP Control PanelOf PHP version switcher, you can try to reinstall the Memcached service.

Click on the left side of the CWP control panel → PHP Settings → PHP Version Switcher → manually select other PHP 7 versions, such as: PHP 7.4.28 version, and check the Memcache and Memcached extension▼

Chen WeiliangThe blog only installed the Memcached extension before, and the lack of installing the Memcache extension caused such a problem.

After installing the Memcache and Memcached extensions at the same time, the problem that the Memcached service did not respond was quickly solved!

Comment

Your email address will not be published. Required fields * Callout

Scroll to Top