[Solved] Database integrity error with MariaDB Cluster

I am stuck with an error that seems pretty critical…

The seafevents.log file is filling with those :

sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1062, “Duplicate entry ‘1698910’ for key ‘PRIMARY’”)
[SQL: INSERT INTO Activity (id, op_type, op_user, obj_type, timestamp, repo_id, commit_id, path, detail) VALUES (%(id)s, %(op_type)s, %(op_user)s, %(obj_type)s, %(timestamp)s, %(repo_id)s, %(commit_id)s, %(path)s, %(detail)s)]
[parameters: {‘id’: 1698910, ‘op_type’: ‘edit’, ‘op_user’: ‘user@domain.tld’, ‘obj_type’: ‘file’, ‘timestamp’: datetime.datetime(2021, 6, 8, 15, 40, 43), ‘repo_id’: ‘fd625c31-18f3-4922-8b19-e6337112ff92’, ‘commit_id’: ‘24f4f40d9ff925f1c30c943ab5e0f982cae9af8a’, ‘path’: “xxxxxxxxx”, ‘detail’: ‘{“size”: 991506, “repo_name”: “yyyyy”, “obj_id”: “da9e5481b333f5b1d6c3f43d8e524bd187546d15”}’}]

We are running a Seafile Pro server v7.1.7 in a Debian 10.9 environment.
The database is hosted by a MariaDB Cluster, but the Seafile Server only “talks” to one machine within this cluster.
The storage is sent to a Ceph S3 Cluster.
Until now we were using a different Seafile Server with the same storage and database, but without those errors.
I don’t understand what is going on with this new Seafile Server and it is driving me crazy.
Does anyone have an idea or a lead ?

Thanks for your help

1 Like


There one more thing I forgot to mention : we are also using an external Memcache server.


1 Like

In case anybody has the same problem, Memcached was a good lead…
According to the documentation, there is no need to install a Memcached related package when you use a Memcached cluster.
We did this :

apt install memcached libmemcached-dev -y

And the problem, which has been driving us nuts for ages, is now gone…

I think that Seafile should warn the administrators when a needed dependency is not available…

1 Like