[horde] Upgrading to PHP 7 with redis - lock problem?

Frank Richter frank.richter at hrz.tu-chemnitz.de
Tue Mar 23 13:49:38 UTC 2021


Hi,

I'm about to upgrade a Horde system to PHP 7.4. We're using redis as 
hashtable with PHP Predis.
We're experiencing locks from time to time: httpd's go up to the limit, 
browsers get no data.

redis-cli monitor shows all the time:
"SETNX" "hht_3db37b5e6a34230ee38cd5a8…_l" "1"

This looks like a lock all the processes are waiting for. DELeting this key 
solves the situation.

Looking for the cause I saw:

[Tue Mar 23 09:02:57.541681 2021] [php7:error] [pid 56021] [client…:53783] 
PHP Fatal error: Uncaught Predis\\ClientException: Command 'EXiSTS' is not a 
registered Redis command. in 
/usr/share/pear/Predis/Profile/RedisProfile.php:88\nStack trace:\n#0 
/usr/share/pear/Predis/Client.php(323): 
Predis\\Profile\\RedisProfile->createCommand()\n#1 
/usr/share/pear/Predis/Client.php(314): Predis\\Client->createCommand()\n#2 
/usr/share/pear/Horde/HashTable/Predis.php(136): 
Predis\\Client->__call()\n#3 /usr/share/pear/Horde/HashTable/Base.php(276): 
Horde_HashTable_Predis->_set()\n#4 
/usr/share/pear/Horde/SessionHandler/Storage/Hashtable.php(125): 
Horde_HashTable_Base->set()\n#5 
/usr/share/pear/Horde/SessionHandler.php(197): 
Horde_SessionHandler_Storage_Hashtable->write()\n#6 [internal function]: 
Horde_SessionHandler->write()\n#7 
/usr/share/pear/Horde/SessionHandler.php(114): session_write_close()\n#8 
[internal function]: Horde_SessionHandler->__destruct()\n#9 {main}\n  thrown 
in /usr/share/pear/Predis/Profile/RedisProfile.php on line 88, referer: …

Googling leads to: 
https://stackoverflow.com/questions/60701260/how-can-i-solve-predis-clientexception-command-exists-is-not-a-registered

„It is a locale issue. I believe you are using Turkish locale in your app. 
And that causes issues with strtoupper function.“
strtoupper('exists') with Turkish locale leads to 'EXiSTS'.

And indeed, locale tr_TR is supported in PHP 7 according to horde/config/nls.php

if (version_compare(PHP_VERSION, '5.5', 'ge')) {
     $horde_nls_config['aliases']['tr'] = 'tr_TR';
     …

Using https://ser.name/login.php?new_lang=tr_TR I can trigger this lock.

Is anyone seeing this as well? Is disabling tr_TR the only solution in the 
moment?

Thanks
Frank

-- 
Frank Richter
Chemnitz University of Technology, Germany


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5373 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.horde.org/archives/horde/attachments/20210323/5c1c9052/attachment.bin>


More information about the horde mailing list