E
E
Evgeny Osipov2020-02-28 23:24:36
1C-Bitrix
Evgeny Osipov, 2020-02-28 23:24:36

Why doesn't memcached caching work in Bitrix on TimeWeb hosting?

The site is hosted by TimeWeb.
To set up memcached caching, I used this instruction.

Through the verification script, you can see that memcached is working:

<?php
 
if (!class_exists("Memcache"))  exit("Memcached не установлен");
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or exit("Невозможно подключиться к серверу Memcached");
 
$version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n";
 
$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;
 
$memcache->set('key', $tmp_object, false, 10) or die ("Не получилось оставить запись в Memcached");
echo "Записываем данные в кеш Memcached (данные будут храниться 10 секунд)<br/>\n";
 
$get_result = $memcache->get('key');
echo "Данные, записанные в Memcached:<br/>\n";
 
var_dump($get_result);
 
?>

Outputs:
Server's version: 1.4.14
Write data to Memcached cache (data will be stored for 10 seconds)
Data written to Memcached:
object(stdClass)#3 (2) { ["str_attr"]=> string(4) "test" [" int_attr"]=> int(123) }


In the performance panel, in the Bitrix Cache Storage tab, memcache is written .

In Debugging, in the Detailed cache statistics, the cache volume is zero:
5e59706898cdb962360764.jpeg

I did the same according to the instructions from Bitrix , but there is no result.
'cache' => array(
      'value' => array(
          'type' => array(
              'class_name' => '\\Bitrix\\Main\\Data\\CacheEngineMemcache',
              'extension' => 'memcache'
          ),
          'memcache' => array(
              'host' => '127.0.0.1',
              'port' => '11211',
          )
      ),
      'sid' => $_SERVER["DOCUMENT_ROOT"]."#login"
  ),


Bitrix technical support said that you need to contact the server administrator, TimeWeb technical support said that the reason is in Bitrix.
Maybe someone faced such a problem?
I will be glad to any advice.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2020-02-29
@Medik18

memcache is a third-party daemon (service) that is associated with the site no more than mysql
has its own settings, ports, etc., not to mention its presence at all.
it is strange to expect a working third-party daemon from hosting, and even one configured as in Bitrix mana.

M
Mikhail Tumanov, 2020-03-01
@mtumanov

Try another hosting.
For several years I tried to get normal work from TimeWeb, as a result, patience snapped - they switched to their own server.
The number of problems has dropped to zero.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question