Internal server error - Redis problem

Hey there,

My nextcloud suddenly stopped to work properly. I haven’t nothing in particular in my logs. loglevel is now at 1 and nothing appears in the file when I refresh the webpage. WebDav is still working

I’ve tried to restore my database with a new nextcloud install (just copying config.php) but the problem is still the same.

I can’t show you the log file because it’s empty now (I cleared it). Here is my config file :

config.php
<?php $CONFIG = array ( 'instanceid' => '*', 'passwordsalt' => '*', 'secret' => '*', 'trusted_domains' => array ( 0 => '**', 1 => '192.168.0.7', ), 'datadirectory' => '/DATA/', 'dbtype' => 'mysql', 'version' => '21.0.0.18', 'overwrite.cli.url' => '*/', 'dbname' => '*', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => '*', 'dbpassword' => '*', 'installed' => true, 'log_type' => 'file', 'logfile' => '/DATA/nextcloud.log', 'logfilemode' => 416, 'loglevel' => 1, 'logdateformat' => 'F d, Y H:i:s', 'default_language' => 'fr', 'default_locale' => 'fr_FR', 'auth.bruteforce.protection.enabled' => true, 'memcache.local' => '\\OC\\Memcache\\Redis', 'filelocking.enabled' => 'true', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, 'timeout' => 0, 'dbindex' => 0, ), 'htaccess.RewriteBase' => '/', 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', 'mail_sendmailmode' => 'smtp', 'mail_from_address' => 'admin', 'mail_domain' => '*', 'maintenance' => false, 'mail_smtpauth' => 1, 'mail_smtphost' => 'SSL0.OVH.NET', 'mail_smtpport' => '465', 'mail_smtpname' => '*', 'mail_smtppassword' => '*', 'theme' => '', 'mail_smtpauthtype' => 'LOGIN', 'updater.release.channel' => 'stable', 'app_install_overwrite' => array ( 0 => 'secsignid', 1 => 'calendar', 2 => 'cookbook', 3 => 'checksum', ), );

Can you please help me to understand what happened and how to repair it ?

[EDIT] It’s a cache problem with Redis.
If I desactivate it like this :
# ‘memcache.local’ => ‘\OC\Memcache\Redis’,
# ‘filelocking.enabled’ => ‘true’,
# ‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
# ‘memcache.locking’ => ‘\OC\Memcache\Redis’,
# ‘redis’ =>
# array (
# ‘host’ => ‘localhost’,
# ‘port’ => 6379,
# ‘timeout’ => 0,
# ‘dbindex’ => 0,
# ),

Server runs again. The command

systemctl status redis

answer me the server is running.

Hi @xetyr !

try with this :

  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),

Hello Mageunic,

I just tested it but the error is still there

@xetyr have you install php-redis ?

Of course :slight_smile:

Everything was working in harmony until this night. But cause you’re talking about this, I’ll investigate more with dialogue between PHP and Redis.

[EDIT] By the end I’ve found the solution thank’s to you !
Redis was well configured, the problem was PHP. For an inexplicable reason Nextcloud was using PHP7.4 and Redis PHP8.0. I deactivated PHP7.4 and everything gone back to normal !

I’ll probably never understand what happened, but that’s fine. Problem solved !

1 Like

Hello,

could you explain how did you do that ? I believe I have the same problem : here but maybe I’m wrong

Thanks !

@ksdrummer

Hi, I’m answering you on your own topic

1 Like

I still don’t comprehend why ‘127.0.0.1’ breaks everything, but ‘localhost’ works, when they’re both the same thing. Just want to thank you, changing to localhost seems to make my installation run fine, memcache and cronjobs.

1 Like

You believe that they’re the same but very often ane is interpreted as a network connection and the other one is used as a replacement of a local socket access :wink: