Skip to content

Configuration

Storage configuration

Configure MongoDB, MySQL, MariaDB or SQLite and Redis for sofyCore, size the connection pools and understand the cache.

Choosing a provider

storage.persistence.provider selects MONGODB (default), MYSQL, MARIADB or SQLITE. Only the section of the selected provider is read; the others are templates. Changing the provider does not move data.

config.ymlYAML
storage:
  persistence:
    provider: MONGODB
    mongodb:
      uri: mongodb://localhost:27017
      database: sofycore

Redis

config.ymlYAML
storage:
  redis:
    uri: redis://localhost:6379
    key-prefix: 'sofycore:'

The key prefix is added to every key and channel. All servers of the same network must use the same Redis and the same prefix.

Pools and limits

KeyDefaultMeaning
pool.maximum-size8Maximum connections per server for SQL and Redis
pool.workers4Concurrent operations (1 to maximum-size; SQLite always uses one)
pool.queue-capacity256Pending operations before new work is rejected
pool.timeout-ms5000Connection, wait and read timeout
pool.health-interval-seconds30Health check interval
cache.ttl-seconds300Shared record cache in Redis (1–86400)

Pools are per server: with ten servers and eight SQL connections each, the database may receive up to eighty connections. Size them for your database budget.

Failure behavior

All database and Redis I/O runs on bounded worker threads, never on the main thread. If the initial connection fails, a real connection failure is detected, or a health check finds the service down, sofyCore rejects new work and disables itself on the server thread. Restore the service and restart; there is no automatic re-activation.