element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
33 stars 5 forks source link

SQLite is not working #3435

Open matrixbot opened 2 weeks ago

matrixbot commented 2 weeks ago

This issue was originally created by @paigeadelethompson at https://github.com/matrix-org/dendrite/issues/3435.

followed the documentation @ https://matrix-org.github.io/dendrite/installation/manual/database and it don't work

monolith-1  | time="2024-09-28T13:21:13.627063518Z" level=panic msg="failed to connect to room server db" error="near \"SEQUENCE\": syntax error"
monolith-1  | panic: (*logrus.Entry) 0xc0002682a0
  database:
    connection_string: file:dendrite_component.db
    max_open_conns: 5
    max_idle_conns: 5
    conn_max_lifetime: -1

tried file:/// and it dont work

matrixbot commented 2 weeks ago

This comment was originally posted by @manchelsi at https://github.com/matrix-org/dendrite/issues/3435#issuecomment-2437146708.

Note that Dendrite cannot share a single SQLite database across multiple components. Each component must be configured with its own SQLite database filename. You will have to remove the global.database section from your Dendrite config and add it to each individual section instead in order to use SQLite.

vxtls commented 11 hours ago

`room_server: database: type: sqlite3 connection_string: "file:/data/chat/room_server.db"

federation_api: database: type: sqlite3 connection_string: "file:/data/chat/federation_api.db"

key_server: database: type: sqlite3 connection_string: "file:/data/chat/key_server.db"

media_api: database: type: sqlite3 connection_string: "file:/data/chat/media_api.db"

sync_api: database: type: sqlite3 connection_string: "file:/data/chat/sync_api.db"

user_api: account_database: type: sqlite3 connection_string: "file:/data/chat/user_api.db"

relay_api: database: type: sqlite3 connection_string: "file:/data/chat/relay_api.db"

mscs: database: type: sqlite3 connection_string: "file:/data/chat/mscs.db" `