Answer the question
In order to leave comments, you need to log in
How does Bitrix work with memcached?
Tell me if Bitrix works with memcached. PHP 7 is installed on our server. I
found this article https://blog.dh.md/2016/12/bitrix-php-memcached.html
It says that Bitrix does not support memcached and you need to install an additional library.
It turns out that in order for Bitrix to work with memcached, it is necessary to install an additional library in Bitrix, or was it like this before and now it is not required to install additional libraries?
The second question is can memcached really help to speed up the site? In our case, when testing the site speed, it is shown that the site is running slowly, the site speed is: Slow (1.59 sec.)
Here are the parameters for loading the site from different regions
Performance parameters
Answer the question
In order to leave comments, you need to log in
Tell me if Bitrix works with memcached.
The second question is can memcached really help to speed up the site?
I will answer in the reverse order - the speed tester checks not only the speed of rendering HTML by the backend (Bitrix), but also how quickly this HTML is displayed by the browser. If you have a fast back but a heavy front, memkesh won't help you. It is necessary to look at detailed statistics of what exactly slows down.
You write that you have PHP 7 installed - which one exactly - 7.0, 7.1, ..., 7.4?
And what is your web environment - shared hosting, vps/vds, BitrixVM?
In general, to make Bitrix work with memcache, you need to:
(I give all the commands for Debian / Ubuntu)
apt-get install -y memcached - put the memcache on the server
apt-get install -y php7.1-dev - install the dev package for your PHP version
pecl install memcache - install the memcache model for Bitrix via PECL, you
may need to install additional libraries, most often stumbles on zlib:
apt-get install -y zlib1g-dev
then add the library connection to php.ini:
extension=memcache.so
and restart the web server
After that, write in the Bitrix config (file /bitrix/.settings.php)
'cache' => array(
'value' => array (
'type' => 'memcache',
'memcache' => array(
'host' => '127.0.0.1',
'port' => '11211'
),
'sid' => $_SERVER["DOCUMENT_ROOT"]."#01"
),
),
memcached
does not work at all
+ allows you to work over the network
+ you can store sessions in a cluster of machines
- slow because it works over the network
- Slow even through a socket (faster than without a cache, of course)
opcache
+ the fastest cache
+ the most standard one goes to the Bitrix VM
-cannot work over the network, if you have a cluster, you will not be able to store sessions in it, otherwise it will disappear when the client changes upstream.
I think you will draw your own conclusion.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question