Folder shares disappear after a few days and slow file browsing with S3 external storage

Hi All,

I recently set up a Nextcloud server connected to an S3 external storage.

Both Nextcloud and the database are running as separate containers in Docker.

Users create folder shares through Nextcloud. However, some of these shares disappear automatically after a few days, and users need to create them again.

We are also experiencing slow performance when browsing folders and files through the Nextcloud.

While reviewing the Nextcloud logs, I found the following database errors:

Warning:
DbalException
An exception occurred while executing a query:
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
Retrying propagation query after retryable exception.

Error:
DbalException
An exception occurred while executing a query:
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
Uncaught exception.

Could these errors be related to the disappearing folder shares or the slow file-browsing performance?

What should I check to identify the root cause and prevent the shares from being removed?

Your kind advice is highly appreciated!

This already is a problem just with your database and does not even involve S3 storage. When you have heavy db usage, make sure you have optimized all the db caching and also the Nextcloud caching (Redis, APCU) in order to reduce the load of the database.

Not sure if such errors are detected somehow and if a share is not reached or cannot be used if it is dropped under certain conditions.

Hello @Majd_Kz,
welcome to the Nextcloud community :handshake:

You’ve posted a request in the support section. Unfortunately you have not completed the required support template. Please edit your post and add as much information as possible so that community supporters have the necessary technical information to help you resolve your issue!

Without additional information the community members cannot help you.

Regards,
jtr