Nextcloud version (eg, 12.0.2): 17.0
Operating system and version (eg, Ubuntu 17.04): Docker image (Debian)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.38
PHP version (eg, 7.1): 7.3.10
The issue you are facing:
Frequently I see issues in the logs like this:
Error PHP session_write_close(): Failed to write session data (redis). Please verify that the current setting of session.save_path is correct (tcp://redis:6379?database=2) at /var/www/html/lib/private/Session/Internal.php
I can see using redis-cli
that database 2 on the host is filling with PHP session information, and most of the time things work fine and I disregard the error. But once in a while a session will hang such that I cannot successfully process any HTTP requests (e.g., load a page on the UI) without deleting cookies on that browser (other sessions for the same user are unaffected). The HTTP requests simply never complete, which I assume is because the session is locked.
The /var/www/html/.user.ini
file remains unedited from what ships with the Docker image. I’m at a loss to diagnose the problem further; wondering if anyone here has had the same issue.
Is this the first time you’ve seen this error? (Y/N): N
Steps to replicate it:
- Configure Nextcloud with Redis cache
- Use Web UI
- Observe error in log
- Occasionally suffer hung session
The output of your Nextcloud log in Admin > Logging:
See above.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
Snipped to limit to what I think is relevant:
‘memcache.distributed’ => ‘\\OC\\Memcache\\Redis’,
‘redis’ =>
array (
‘host’ => ‘redis’,
‘port’ => 6379,
‘timeout’ => 0,
‘password’ => ‘’,
‘dbindex’ => 0,
),
‘filelocking.enabled’ => true,
‘filelocking.ttl’ => 3600,
‘memcache.locking’ => ‘\\OC\\Memcache\\Redis’,
The output of your Apache/nginx/system log in /var/log/____
:
Nothing relevant here