-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Intermittent sqlite3.OperationalError: table background_updates already exists
on startup
#14460
Comments
homeserver.yaml server_name: localhost:9999
pid_file: /data/homeserver.pid
listeners:
- port: 8008
tls: false
type: http
bind_addresses:
- '::'
x_forwarded: false
resources:
- names:
- client
compress: true
- names:
- federation
compress: false
database:
name: sqlite3
args:
database: /data/homeserver.db
log_config: /data/localhost:9999.log.config
media_store_path: /data/media_store
registration_shared_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
report_stats: false
macaroon_secret_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
form_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
signing_key_path: /data/localhost:9999.signing.key
trusted_key_servers:
- server_name: matrix.org
public_baseurl: http://localhost:9999
enable_registration_without_verification: true
app_service_config_files:
- /appservice/integration.yml
rc_message:
per_second: 1000000000
burst_count: 1000000000
rc_registration:
per_second: 1000000000
burst_count: 1000000000
rc_admin_redaction:
per_second: 1000000000
burst_count: 1000000000
rc_login:
address:
per_second: 1000000000
burst_count: 1000000000
account:
per_second: 1000000000
burst_count: 1000000000
failed_attempts:
per_second: 1000000000
burst_count: 1000000000
rc_invites:
per_room:
per_second: 1000000000
burst_count: 1000000000
per_user:
per_second: 1000000000
burst_count: 1000000000
per_sender:
per_second: 1000000000
burst_count: 1000000000
modules: [] |
Also witnessed on Mjölnir CI a few times:
These instances also make use of mx-tester (as we're using mx-tester for everything), so it's possible that mx-tester is the culprit. |
Does your setup persist and reuse the database in any way? |
Not as far as I can tell. I do not go to specific lengths to ensure that there is no database file, though. |
@DMRobertson Shouldn't this work even when there is a database, though? |
Yes. But it's possible Synapse might have been killed midway through enforcing a schema dump, which is the only way I can imagine this state arising. We should make the db migrations transactional (cf #14401) |
…able background_updates already exists" We regularly encounter issue matrix-org/synapse#14460 This PR attempts harder to cleanup leftovers from previous runs, in particular `homeserver.db`, hoping that this will help make startup more reliable.
…able background_updates already exists" We regularly encounter issue matrix-org/synapse#14460 This PR attempts harder to cleanup leftovers from previous runs, in particular `homeserver.db`, hoping that this will help make startup more reliable.
…able background_updates already exists" We regularly encounter issue matrix-org/synapse#14460 This PR attempts harder to cleanup leftovers from previous runs, in particular `homeserver.db`, hoping that this will help make startup more reliable.
…able background_updates already exists" We regularly encounter issue matrix-org/synapse#14460 This PR attempts harder to cleanup leftovers from previous runs, in particular `homeserver.db`, hoping that this will help make startup more reliable.
I've seen this happen more and more often. Is there a way to make sure that all databases are created properly before shutting down an instance of Synapse? |
By the time |
I'm not sure, but that's what I'm investigating at the moment. |
This feels a bit like #6467, but we fixed that... |
sqlite3.OperationalError: table background_updates already exists
on startupsqlite3.OperationalError: table background_updates already exists
on startup
Description
I'm using Synapse in CI for testing a variety of tools (bots, modules, AppServices).
Recently, I've been seeing error
sqlite3.OperationalError: table background_updates already exists
on some startups of Synapse. It seems non-deterministic but it makes my life quite complicated, as my CI may fail for reasons unrelated to the code I'm testing.Reproduced on GitLab CI and GitHub CI.
Steps to reproduce
Trying to find simple STRs.
Right now, the simplest I have is that https://github.com/matrix-org/mx-tester/ on CI sometimes exhibits the problem, e.g. https://github.com/matrix-org/mx-tester/actions/runs/3478612923 .
Homeserver
CI
Synapse Version
1.71.0
Installation Method
No response
Platform
Running on a container created with the following Dockerfile.
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: