Skip to content

Can't use Redis through UNIX socket for the task scheduler #9004

Closed
@HorlogeSkynet

Description

@HorlogeSkynet
  • Gitea version (or commit ref): v1.10.0
  • Git version: v2.20.1
  • Operating system: Debian Buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Hey back the team, second issue of the evening.
It looks like we cannot make the task scheduler use Redis over an UNIX socket, as for the cache storage or the session provider.

[task]
QUEUE_TYPE     = redis
QUEUE_CONN_STR = network=unix addrs=/var/run/redis/redis-server.sock password=$PASSWORD db=$N pool_size=$X idle_timeout=$T

The service hard-fails at startup with :

routers/init.go:107:GlobalInit() [F] Failed to initialize task scheduler: dial tcp [::1]:6379: connect: connection refused

So this issue got multiple purposes :

  1. Should we be able to achieve this ?
  2. Why connection strings are not parsed consistently across different configuration entries ?
    • addr becomes addrs
    • Token separator is sometimes , and some other times
    • Some options as network, pool_size or idle_timeout are de facto not interpreted (still according to the parser sources of the task scheduler)
  3. kind/proposal : cache, session, task and issue indexer connection strings should be configured the same way.

Bye again 👋

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions