I'm sad to see that of the three #xobaque instances I run, two of them seem to be unavailable after I restarted them. I don't know if they were available before the restart because I installed a new binary. I can access the SQLite database from the command line but the services just isn't responding via the Unix domain socket. At least I know it's unrelated to the web server configuration.

Oops! Just now the second one came back up. Perhaps they just take forever to start up? It's fast, now. Perhaps SQLite does some sort of maintenance every now and then? The last one is in fact the largest database.

Hm. Perhaps my migration code is a problem. I tried to avoid a table containing the current version and instead I test for features on startup. For example, I run select url from pages where 1=0 and if that gives me an error, I do a bunch of stuff. I would have thought that all the selects I do are fast, but who knows. This SQLite file is 935M.

I decided to hand out some more memory via the service and restarted it. Let's see if that works overnight. 😥
Checking back hours later and the service is up and running so that I must conclude that my smarty pants migration check is just too lousy.

I rewrote the migration code and it still takes forever to restart two of the three search engines. I get the feeling that perhaps it takes forever for #SQLite to open database files of nearly 1G the way I do:

pragma journal_mode=WAL pragma integrity_check pragma optimize

Any thoughts on this?

Edited to add my own thoughts after reading the documentation of the quick_check pragma: "PRAGMA integrity_check requires O(NlogN) time where N is the total number of rows in the database." I guess that explains it.