Looking for a solution to the error “could not connect to Memcached”? We can help you.

Memcached is a caching system that speeds up the website performance.

Here at Bobcares, we often receive requests to fix Memcached errors as a part of our Server Management Services.

Today, let’s see how our Support Engineers fix this error.


Why Memcached doesn’t connect to the host?

We’ve seen many of our customers experiencing this error message due to different causes. Here are a few of them:

1. Error in the configuration file: If any important variable is missing in the configuration then it will throw errors.

2. Problem with port:  If the Memcached is not able to listen to the port then it will also cause an error. The default port of Memcached is 11211.

3. Disabled Memcached: If the Memcached itself is not enabled properly then it will throw errors. So it is very important to check if the Memcached is properly enabled on the server or not.


How we fix could not connect to Memcached error?

Having a decade of experience in managing servers, our Dedicated Engineers are familiar with the Memcached errors. Now, let’s discuss how our Support Engineers fix this error.

Recently, one of our customers approached us with the below error message

Our Support Engineers started troubleshooting the error by checking if the Memcached is listening to the port or not.

We ran the below command for it.

netstat -tap | grep memcached

As a result, we could see that the Memcached was listening to port 11211. So there was no problem with the port in this case.

We further went checking for the configuration file config.php. And then we added the below lines in it and saved it.

$config['distributed_poller_memcached_host'] = 'localhost';
$config['distributed_poller_memcached_port'] = '11211';

Finally, this fixed the error.

In content management systems like Joomla, the Memcache configuration can be easily managed from the Admin panel at System > Global Configuration > System

Joomla Memcache


[Need any help in fixing Memcached errors? – We’ll help you]



In short, the error “could not connect to Memcached” occurs due to many reasons like an error in the configuration file, missing the Memcached module, missing port and many more. Today, we saw how our Support Engineers fix this error.


Source link


Write A Comment