Redis Unix Socket #2186

Closed
opened 2026-02-05 03:13:55 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @E-Fail on GitHub (Apr 8, 2021).

I'm unable to use a unix_socket for the Redis cache.

I have tried the following options:

REDIS_SERVERS=localhost;unix_socket=/var/run/redis/redis-server.sock
REDIS_SERVERS=127.0.0.1;unix_socket=/var/run/redis/redis-server.sock
REDIS_SERVERS=unix_socket=/var/run/redis/redis-server.sock
REDIS_SERVERS=127.0.0.7:0:0

Cache & Session driver to use

Can be 'file', 'database', 'memcached' or 'redis'

CACHE_DRIVER=redis
SESSION_DRIVER=redis

Everything I tried leaves a blank page in my browser.

Bookstack 0.30.4, PHP 7.3, NGNIX, Debian 10

Originally created by @E-Fail on GitHub (Apr 8, 2021). I'm unable to use a unix_socket for the Redis cache. I have tried the following options: REDIS_SERVERS=localhost;unix_socket=/var/run/redis/redis-server.sock REDIS_SERVERS=127.0.0.1;unix_socket=/var/run/redis/redis-server.sock REDIS_SERVERS=unix_socket=/var/run/redis/redis-server.sock REDIS_SERVERS=127.0.0.7:0:0 # Cache & Session driver to use # Can be 'file', 'database', 'memcached' or 'redis' CACHE_DRIVER=redis SESSION_DRIVER=redis Everything I tried leaves a blank page in my browser. Bookstack 0.30.4, PHP 7.3, NGNIX, Debian 10
Author
Owner

@ssddanbrown commented on GitHub (Apr 9, 2021):

Hi @E-Fail,
Looks like we don't currently support a way to use redis via a unix socket via our standard configuration options, Just TCP usage.

Out of interest, is there a specific reason why socket may be required over tcp?

@ssddanbrown commented on GitHub (Apr 9, 2021): Hi @E-Fail, Looks like we don't currently support a way to use redis via a unix socket via our standard configuration options, Just TCP usage. Out of interest, is there a specific reason why socket may be required over tcp?
Author
Owner

@tiredofit commented on GitHub (Apr 9, 2021):

Hi @E-Fail, Have you tired: /var/run/redis/redis-server.sock as the value for REDIS_SERVERS?

Also, please confirm you have php redis extension installed?

@tiredofit commented on GitHub (Apr 9, 2021): Hi @E-Fail, Have you tired: `/var/run/redis/redis-server.sock` as the value for `REDIS_SERVERS`? Also, please confirm you have php `redis` extension installed?
Author
Owner

@E-Fail commented on GitHub (Apr 9, 2021):

PHP-redis is installed and active. The value /var/run/redis/redis-server.sock did not work, blank page.

The main reason to use a unix socket is the latency. A TCP socket on the loopback interface is slower than a unix socket

@E-Fail commented on GitHub (Apr 9, 2021): PHP-redis is installed and active. The value /var/run/redis/redis-server.sock did not work, blank page. The main reason to use a unix socket is the latency. A TCP socket on the loopback interface is slower than a unix socket
Author
Owner

@ssddanbrown commented on GitHub (Apr 9, 2021):

The main reason to use a unix socket is the latency. A TCP socket on the loopback interface is slower than a unix socket

Sure, but is it signifiant enough to worry about supporting it? My intentions in supporting redis are really for the purposes of remote or high-availability cache/session support, Otherwise the default filesystem driver is good enough.

@ssddanbrown commented on GitHub (Apr 9, 2021): > The main reason to use a unix socket is the latency. A TCP socket on the loopback interface is slower than a unix socket Sure, but is it signifiant enough to worry about supporting it? My intentions in supporting redis are really for the purposes of remote or high-availability cache/session support, Otherwise the default filesystem driver is good enough.
Author
Owner

@E-Fail commented on GitHub (Apr 11, 2021):

Close. Was just a question. I thought I configured something wrong

@E-Fail commented on GitHub (Apr 11, 2021): Close. Was just a question. I thought I configured something wrong
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2186