reading files of 2.2 Gb is a performance problem for any OS, with a SSD disk things get better, but it’s bad anyway. Being a database the problem is worse because the system needs to do read and write operations in different parts of the file. Theorically sqlite can handle even terabytes of data, but things will go bad in a concurrent system as a web server. If the OS could keep all the database in memory things would go better, but that’s not your case.
There is one good solution from a sysops point of view: Kolibri can be used with Postgresql. Being a client-server database does not have this file problems.
However, before switching to a database that requires some sysadmin skills, I would like you to do a test: sqlite databases tend to be
fragmented (yes, as the disks partitions in windows OS) due to multiple read/write/delete operations. Kolibri includes the vacuum procedure to defrag it when starting up, but it looks like it’s not working correctly in your environment. I think it’s timing out in your system because some other process is accesing to the database file at the same time.
Could you (all these operations have to be done inside the kolibri home folder):
a) stop kolibri
b) ensure no process has the database open with
lsof db.sqlite3. The output should not have anything but a warning.
c) check the kolibri database filesize with
ls -lh db.sqlite3
d) to ensure you have sqlite3 installed:
sudo apt install sqlite3
e) execute :
f) check again the kolibri database filesize with
ls -lh db.sqlite3
The output between c) and f) should be quite different if the vacuum process has defragmented the database.
If you still have a file with 1.7 gb there’s no option: either you live with the sloweness of it or you switch to use Postgresql.
If the filesize is much smaller, you are done. You can repeat this process from time to time to keep your database size limited. (or try to use kolibri using the deb installer to check if the vacuum problem is due to the pex envirnoment)
I know these steps could be complex, depending on your Linux knowledge, don’t hesitate to ask for more help if needed.