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.
storage:
persistence:
provider: MONGODB
mongodb:
uri: mongodb://localhost:27017
database: sofycorestorage:
persistence:
provider: MYSQL # or MARIADB
mysql:
host: localhost
port: 3306
database: sofycore
username: sofycore
password: 'change-me'
tls: false # true verifies the server certificate and hostnamestorage:
persistence:
provider: SQLITE
sqlite:
file: storage/sofycore.db # relative to the plugin folderRedis
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
| Key | Default | Meaning |
|---|---|---|
pool.maximum-size | 8 | Maximum connections per server for SQL and Redis |
pool.workers | 4 | Concurrent operations (1 to maximum-size; SQLite always uses one) |
pool.queue-capacity | 256 | Pending operations before new work is rejected |
pool.timeout-ms | 5000 | Connection, wait and read timeout |
pool.health-interval-seconds | 30 | Health check interval |
cache.ttl-seconds | 300 | Shared 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.