Applicable to:
- Plesk Onyx for Linux
Symptoms
-
The following optimization guide was implemented for Redis: How To Optimize WordPress With Redis And Docker
-
Wordpress > example.com > Log in > Plugins > Redis Object Cache Plugin > Settings shows as Not Connected:
CONFIG_TEXT: Not connected
-
PHPRedis
installed is 3.0:# rpm -qa | grep redis
plesk-php73-redis-3.0.0-1centos.7.190906.1643.x86_64
Cause
Latest Redis required is PHPRedis
5.0.
This has been reported as bug ID PPP-45378 which has been fixed in Plesk 18.0.29.
Resolution
Workaround
At first, log into the server via SSH and prepare the environment:
# yum install gcc libmemcached-devel zlib-devel
# yum install plesk-php56-devel plesk-php70-devel plesk-php71-devel plesk-php72-devel plesk-php73-devel
# apt install autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php..-dev zlib1g-dev
-
Then, use the following instructions to upgrade redis:
Note: in the example below, instructions for PHP 7.3 are provided.
-
Upgrade the redis extension:
# /opt/plesk/php/7.3/bin/pecl upgrade redis
-
It might show the following warning. Just press 'Enter' without specifying anything to continue the installation:
# /opt/plesk/php/7.3/bin/pecl upgrade redis
pecl/redis can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/redis can optionally use PHP extension "msgpack" (version >= 2.0)
downloading redis-3.0.4.tgz ...
Starting to download redis-3.0.4.tgz (78,776 bytes)
..................done: 78,776 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
libmemcached directory [no] : -
Register extension in configuration file:
# echo "extension=redis.so" > /opt/plesk/php/7.3/etc/php.d/redis.ini
-
Update PHP handlers information:
# plesk bin php_handler --reread
-
Restart Apache in Tools & Settings > Services Management.
Note: In case FPM service is used, it is required to restart FPM service as well. It can be done through Tools & Settings > Services Management.
-
Comments
9 comments
Thanks for this detailed workaround for the WordPress plugin. It seems the plugin developer has relaxed their requirement, so it now works even with the older
PHPRedis
3. But I still prefer to keep my installations on the latest 5.1 for performance reasons.The challenge, however, is that with each incremental PHP patch release auto-applied to our Plesk farm I need to redo the above steps, as the updated PHPRedis gets overwritten as part of the upgrade. With the 3.0 version being released Jun 10, 2016 is there any plan to get the Plesk PHP updater to use a new version? I'd rather not have to build a plan around trying to cron-job update PHPRedis to keep it up to date despite Plesk regularly rolling it back.
Hello Neil Elver,
Currently we do not have an ETA when bug PPP-45378 is fixed.
Almost 5 months have passed is PPP-45378 finally resolved?
Or do you really have to redo all those steps again as Neil mentioned?
If not fixed, than please create a work-around as this will take to much time for the customers with (newer) Redis installed (server/client). TY.
Hello Michel!
This should be resolved since Plesk 18.0.29.
PHPredis was updated to 5.3.0.
The article will be updated too.
Hi Ivan,
Yeah, I noticed this myself earlier this week. So we do not need to upgrade PHP anymore through PECL, right?
And what happens if I did anyways? As it did say it upgraded things. Would it harm or change anything in future upgrades by Plesk or will it revert just back to PHPredis 5.3.0 as Plesk supplies?
Thanks.
Michel
Some time will be required to prepare an answer.
Expect an update in the ticket.
Hi Michel
I updated redis by following this article on Plesk 18.0.20.
After that, I upgraded to 18.0.29 and no issues were shown in Redis.
That being said, you do not need to do anything after upgrading to Plesk 18.0.29.
I am still getting this problem. Configured properly in wordpress config.
In docker I might be missing some parameters not sure, but I am using the most used image out of all listed.
I have set it up on Wordpress many times. However with this server I am getting:
Status: Not connected
Client: PhpRedis (v5.3.2)
Drop-in: Valid
Disabled: No
Filesystem: Working
Ping:
Connection Exception: Connection refused (RedisException)
Errors: [
"Connection refused"
]
Do I need to open a port or something?
The docker image container is running fine. Its all as you would expect but I cannot work out why it wont connect.
PHP settings has Redius checked too.
Hello,
Try to open port configured during setting up Redis:
https://support.plesk.com/hc/en-us/articles/115001078014-How-to-manage-local-firewall-rules-using-Plesk-Firewall-on-Linux
If it does not help submit request to support since investigation is required;
https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Please sign in to leave a comment.