Oh, Photoprism

mariadb_1 | 2022-04-11 18:17:42 0 [ERROR] InnoDB: preallocating 507904 bytes for file ./photoprism/faces.ibd failed with error 28 mariadb_1 | 2022-04-11 18:17:42 0 [ERROR] [FATAL] InnoDB: Error (Out of disk space) in rollback. mariadb_1 | Fatal signal 6 while backtracing photoprism_mariadb_1 exited with code 139

We recently got our hands on some enterprise hardware and we’re now using it to run some VMs and whatnot. One of the projects I’ve had for a long time is trying to figure out a way to have a web gallery. After looking around at the available options we decided to give a shot to Photoprism.

Requirements aren’t complicated:
– Display pictures and associated metadata quickly, as a gallery.
– Have wide compatibility for various filetypes, including RAW and video files.
– Mobile app helps but it’s not a hard requirement. Web first, preferably with minimum javascript thrown in.

We have about 46 thousand files including pictures and videos, consuming 265 GB of storage. A bit more than what most people would have sure, but any cloud picture solution would definitely charge a good chunk of money to store all of them.

Now, on to PhotoPrims itself. It does Docker Compose but… fine, whatever, you want me to do the devops shit, fine. It’s easy to install, after all:

# mkdir -p /opt/photoprism
# wget https://dl.photoprism.app/docker/docker-compose.yml
# vi docker-compose.yml

You just edit docker-compose.yml with the bits and pieces you need specific to your installation and you’re good to go. Being lazy I mounted pictures storage via CIFS from the storage server. Tried to get it to work directly in Docker but it kept telling me to kick rocks.

Then you run the actual service:

# docker-compose up -d

Starts up a server accesible on the local network at http://server:2342. The documentation does state securing the connection is an exercise left to the reader, but as I only plan to run this on my LAN and accessible only via VPN, it’s fine.

This is where we started running into issues. The first VM created for it had 2 vCPUs, 8GB RAM, 16GB HDD VM. It ran out of drive space after thrashing CPU for a bit. We upgraded the VM to 8 vCPU, 32BM RAM, 32GB HDD. It ran out of disk space after thrashing the CPU cores for a bit longer.

Mmmkay, now we have a bad time going here. Upgraded VM to 16 vCPU, 64GB RAM, 64 GB HDD. It ran out of disk space again after thrashing the CPU cores for a solid 20 hours. We get it, it’s using TensorFlow for AI stuff but as a comparison Digikam is able to do the same things but doesn’t consume nearly as many resources, for as long.

We suppose it really wants you to be using modern hardware of the sort that is incredibly expensive and to find given the current supply chain issues worldwide.