Nextcloud: 423 locked

Good afternoon,

I’m using the Nextcloud rock-on that @Flox rolled for me back in this post:

I’ve started getting a series of Server replied "423 Locked" errors on file sync. I’ve done a bit of reading and it looks like what I need to do is enable maintenance mode (sudo -u www-data php occ maintenance:mode --on) and then empty the oc_file_locks table.

The problem is, I don’t know how to edit the table. The relevant line in the Rock-On appears to be SQLITE_DATABASE=nextcloud-sqlite but I can’t find that database. If I open the docker container (docker exec -it -u www-data nextcloud-official bash; I’ve also tried -u root), I notice that the container doesn’t seem to have sqlite3 installed at all:

www-data@6c71aad3dc74:~/html$ apt --simulate install sqlite 
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libreadline7 libsqlite0 readline-common sqlite3
Suggested packages:
  readline-doc sqlite-doc sqlite3-doc
The following NEW packages will be installed:
  libreadline7 libsqlite0 readline-common sqlite sqlite3
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Inst readline-common (7.0-5 Debian:10.3/stable [all])
Inst libreadline7 (7.0-5 Debian:10.3/stable [amd64])
Inst libsqlite0 (2.8.17-15 Debian:10.3/stable [amd64])
Inst sqlite (2.8.17-15 Debian:10.3/stable [amd64])
Inst sqlite3 (3.27.2-3 Debian:10.3/stable [amd64])
Conf readline-common (7.0-5 Debian:10.3/stable [all])
Conf libreadline7 (7.0-5 Debian:10.3/stable [amd64])
Conf libsqlite0 (2.8.17-15 Debian:10.3/stable [amd64])
Conf sqlite (2.8.17-15 Debian:10.3/stable [amd64])
Conf sqlite3 (3.27.2-3 Debian:10.3/stable [amd64])

I can run sqlite3 from the main Rockstor installation, but I don’t see the Nextcloud database:

[root@rockstor ~]# sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main                                                                       

So I’m not sure where my sqlite3 DB is or how to access it. Can anyone point me in the right direction? Thanks!

I figured this one out on my own. The DB is under the data directory. I installed sqlite3 and ran

root@6c71aad3dc74:/var/www/html# cd data
root@6c71aad3dc74:/var/www/html/data# sqlite3 nextcloud-sqlite.db 
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> DELETE FROM oc_file_locks WHERE 1;

and that seems to have done the job. I’m still having some performance issues with Nextcloud; it’s spawning a lot more apache2 processes than seem necessary for a single-user setup, and taking up 100% of my CPU a lot of the time. But that may be more of a question for the Nextcloud forums than here.

3 Likes