failed to update site configuration: someone else has already applied a newer edit
Created by: ggilmore
When running 3.13.2
via run-server-image.sh
, I occasionally get this error which crashes the server:
❯ env IMAGE=sourcegraph/server:3.13.2 ./dev/run-server-image.sh
Do you want to delete /tmp/sourcegraph and start clean? [Y/n] y
deleting /tmp/sourcegraph
pulling docker image sourcegraph/server:3.13.2
3.13.2: Pulling from sourcegraph/server
Digest: sha256:57efb039dc5b5734322a16924a0e34ae5e4b0f0d26b07d851be738805c4f32cc
Status: Image is up to date for sourcegraph/server:3.13.2
docker.io/sourcegraph/server:3.13.2
starting server...
2020/03/13 21:32:30 enterprise edition
/etc/sourcegraph/ssh does not exist, so only repos that do not require SSH will be accessible.
$ /bin/mkdir mkdir -p /run/postgresql
$ /bin/chown chown -R postgres /run/postgresql
✱ Setting up PostgreSQL at /var/opt/sourcegraph/postgresql
✱ Sourcegraph is initializing the internal database... (may take 15-20 seconds)
$ /bin/mkdir mkdir -p /var/opt/sourcegraph/postgresql
$ /bin/chown chown postgres /var/opt/sourcegraph/postgresql
$ /sbin/su-exec su-exec postgres initdb -D /var/opt/sourcegraph/postgresql --nosync
$ /sbin/su-exec su-exec postgres pg_ctl -D /var/opt/sourcegraph/postgresql -o -c listen_addresses=127.0.0.1 -l /tmp/pgsql.log -w start
$ /sbin/su-exec su-exec postgres createdb sourcegraph
$ /sbin/su-exec su-exec postgres pg_ctl -D /var/opt/sourcegraph/postgresql -m fast -l /tmp/pgsql.log -w stop
21:32:41 postgres_exporter | time="2020-03-13T21:32:41Z" level=info msg="Established new database connection to \"127.0.0.1:5432\"." source="postgres_exporter.go:814"
21:32:41 zoekt-webserver | 2020/03/13 21:32:41 listening on 127.0.0.1:3070
21:32:41 zoekt-indexserver | 2020/03/13 21:32:41 serving HTTP on 127.0.0.1:6072
21:32:41 zoekt-indexserver | 2020/03/13 21:32:41 [DEBUG] GET http://127.0.0.1:3090/.internal/ping?service=gitserver
21:32:41 zoekt-indexserver | 2020/03/13 21:32:41 [ERR] GET http://127.0.0.1:3090/.internal/ping?service=gitserver request failed: Get http://127.0.0.1:3090/.internal/ping?service=gitserver: dial tcp 127.0.0.1:3090: connect: connection refused
21:32:41 zoekt-indexserver | 2020/03/13 21:32:41 [DEBUG] GET http://127.0.0.1:3090/.internal/ping?service=gitserver: retrying in 1s (4 left)
21:32:41 repo-updater | 2020/03/13 21:32:41 enterprise edition
21:32:42 zoekt-indexserver | 2020/03/13 21:32:42 [ERR] GET http://127.0.0.1:3090/.internal/ping?service=gitserver request failed: Get http://127.0.0.1:3090/.internal/ping?service=gitserver: dial tcp 127.0.0.1:3090: connect: connection refused
21:32:42 zoekt-indexserver | 2020/03/13 21:32:42 [DEBUG] GET http://127.0.0.1:3090/.internal/ping?service=gitserver: retrying in 2s (3 left)
21:32:42 postgres_exporter | time="2020-03-13T21:32:42Z" level=info msg="Established new database connection to \"127.0.0.1:5432\"." source="postgres_exporter.go:814"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying Postgres Version on \"127.0.0.1:5432\"" source="postgres_exporter.go:1318"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=info msg="Semantic Version Changed on \"127.0.0.1:5432\": 0.0.0 -> 11.7.0" source="postgres_exporter.go:1335"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="sent_location is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="procpid is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="flush_location is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="replay_location is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="write_location is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="pg_xlog_location_diff is being forced to discard due to version incompatibility." source="postgres_exporter.go:532"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying pg_setting view on \"127.0.0.1:5432\"" source="pg_setting.go:15"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying namespace: pg_stat_database_conflicts" source="postgres_exporter.go:1259"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying namespace: pg_locks" source="postgres_exporter.go:1259"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying namespace: pg_stat_replication" source="postgres_exporter.go:1259"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying namespace: pg_stat_activity" source="postgres_exporter.go:1259"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=debug msg="Querying namespace: pg_stat_database" source="postgres_exporter.go:1259"
21:32:43 postgres_exporter | time="2020-03-13T21:32:43Z" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1576"
21:32:44 zoekt-indexserver | 2020/03/13 21:32:44 [ERR] GET http://127.0.0.1:3090/.internal/ping?service=gitserver request failed: Get http://127.0.0.1:3090/.internal/ping?service=gitserver: dial tcp 127.0.0.1:3090: connect: connection refused
21:32:44 zoekt-indexserver | 2020/03/13 21:32:44 [DEBUG] GET http://127.0.0.1:3090/.internal/ping?service=gitserver: retrying in 4s (2 left)
21:32:46 frontend | 2020/03/13 21:32:46 enterprise edition
21:32:46 frontend | t=2020-03-13T21:32:46+0000 lvl=warn msg="migrating configuration: failed to update site configuration" error="someone else has already applied a newer edit"
21:32:46 frontend | someone else has already applied a newer edit
frontend died. Shutting down...
21:32:46 frontend | Terminating frontend
21:32:46 postgres_exporter | Terminating postgres_exporter
21:32:46 syntect_server | Terminating syntect_server
21:32:46 searcher | Terminating searcher
21:32:46 zoekt-indexserver | Terminating zoekt-indexserver
21:32:46 zoekt-webserver | Terminating zoekt-webserver
21:32:46 gitserver | Terminating gitserver
21:32:46 replacer | Terminating replacer
21:32:46 query-runner | Terminating query-runner
21:32:46 github-proxy | Terminating github-proxy
21:32:46 symbols | Terminating symbols
21:32:46 lsif-server | Terminating lsif-server
21:32:46 repo-updater | Terminating repo-updater
21:32:46 nginx | Terminating nginx
21:32:46 redis-store | Terminating redis-store
21:32:46 lsif-worker | Terminating lsif-worker
21:32:46 prometheus | Terminating prometheus
21:32:46 redis-cache | Terminating redis-cache
21:32:47 postgres | Terminating postgres
21:32:50 grafana | Terminating grafana
Notes:
- I get this error even though I deleted the old data storage folder
- It's flakey - I don't get this error every time I run this command