I did just install nextcloud on my archlinux server. I am using postgresql and uwsgi. Here is list of installed packages:
nextcloud 15.0.4-1
postgresql 11.1-3
php 7.3.2-1
php-pgsql 7.3.2-1
uwsgi 2.0.18-1
uwsgi-plugin-php 2.0.18-1
Everytime I upload file or files I am getting several error messages in journal. For upload one file I get 4 times following output:
postgres[554]: 2019-02-18 20:07:12.312 CET [5110] ERROR: duplicate key value violates unique constraint "lock_key_index"
postgres[554]: 2019-02-18 20:07:12.312 CET [5110] DETAIL: Key (key)=(files/400cc953a3e9981fad972cd0d650dbd3) already exists.
postgres[554]: 2019-02-18 20:07:12.312 CET [5110] STATEMENT: INSERT INTO "oc_file_locks" ("key", "lock", "ttl") VALUES($1, $2, $3)
Same error I get when deleting or rename file.
Already trying to find what is the problem, but I could not find any help.
Thank you for any tip and help.
I did configure NC to connect to PSQL over unix socket. I did think that it could be a problem.
SO I did change that to 127.0.0.1 (using standart port).
In reality 127.0.0.1 should not change anything because it only defines the database access but doesn’t effect file locking within Nextcloud. Have you searched the issue tracker to find a solution for your problem? Especially the mentioned locking problem has already been reported in one or the other way, like e.g. https://github.com/nextcloud/server/issues/9305. As far as I can see one recommendation is e.g. to install and use Redis for file locking.
well, I did find several locking problems but not with table oc_file_locks so thank you for pointing me to that thread.
I did disable APC cache and using only opcache. Problem is still there.
now I am getting message “No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the [documentation]”(https://docs.nextcloud.com/server/15/go.php?to=admin-performance).
OK I will try redis. I assume that I should use redis instead APC not together, right?
I did restat uwsgi@nextcloud.service but still getting errors from postgresql about duplicate key.
if I am uncomment memcache.distributed option from config
I am getting this error in webbrowser
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
and I am not know where I am doing a mistake.
thank you for any help and tip