Author Topic: Extremely slow deletes/updates & repeated apply change journal batch timeouts  (Read 319 times)

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
I wrote this last month but didn’t post it due to lack of time & having found a workaround (as below) in always waiting for each process to finish before beginning another. I also had to stop using collections, managing  with colour labels & only making large collection, removal & deletion operations overnight. I’m posting it now in the hope that it’ll be of help to others & perhaps bring out some insights that will allow PM+ to work better with large batches.

I’m seeing severe performance issues with Photo Mechanic Plus catalog updates on a Mac Studio, even in a brand‑new catalog, and I’d like to know if anyone else has run into something similar.

Environment

Mac Studio M2 Max, 64 GB RAM

macOS 15.6.1

Catalogs on internal 2 TB SSD

Image files on fast TB4 NVMe drives

Photo Mechanic Plus PM6+ (current build)

What works well

In both my original catalog (~350k images) and a new catalog (~230k images), all of the following are very fast:

Catalog searches

Browsing contact sheets

Batch renaming files

Applying metadata templates

Applying colour labels/ratings to thousands of images at once

These operations complete in seconds and PM+ stays responsive.

Where the problems are

The performance issue appears specifically when the catalog’s membership changes:

Deleting files from the catalog

Removing files from the catalog (without deleting on disk)

Adding/removing large numbers of images in collections

For example, in the new catalog (~230k images):

I added a colour tag to ~8,800 images (instant).

Deleting that colour‑tagged set from a simple contact sheet (no collections involved) took about 17 hours to finish.

In my original catalog (~350k images), deleting a few hundred images or adding/removing large sets from collections regularly causes very long “Updating 1 catalog, n batches remaining” periods (tens of minutes or more). During this process contact sheets are either frozen or show black or blank squares.

During these operations, the Catalog Status window shows many repeating errors like:

Error: RPCServerConn.rpc_dispatch: exception: CILA::PROTO::RPCException/apply_change_journal_batch failed: [:rpc_timeout]
Error: CatalogMetadataUpdateTask.try_spawn_metadata_update: apply_change_journal_batch failed: [:rpc_timeout]
Error: RPCServerConn.rpc_dispatch: exception: CILA::PROTO::RPCException/count_documents failed: [:rpc_timeout]

So:

apply_change_journal_batch keeps timing out.

CatalogMetadataUpdateTask keeps failing to spawn metadata updates.

Even query_num_documents (count_documents) sometimes times out.

This is happening in two separate catalogs on the same machine:

my long‑lived ~350k‑image catalog, and

a new ~230k‑image catalog built from scratch with the old one disabled while scanning.

What I’ve already tried

Ensured catalogs are on the internal SSD; photos on NVMe.

Reduced disk cache and render cache to more modest sizes (helped open/quit speed, didn’t fix deletes).

Deleted the catalog state files (cat_state… plus -wal and -shm) for the original catalog.

Created a new catalog and rescanned all drives into it.

Performed problematic deletes from simple contact sheets (plain search / folder results, not collections).

The core problem remains: large deletes and large collection membership changes are extremely slow and flood Catalog Status with apply_change_journal_batch and count_documents timeouts, even in the new catalog.

Current workaround

I’ve ended up:

Using colour labels to mark images for removal/deletion.

Doing all “lightweight” work (search, metadata, renaming, tagging) during the day.

Running the actual deletes/collection updates in big batches overnight.

This works, but it’s far from ideal.

Questions for the community

Has anyone else on Apple Silicon / recent macOS seen similar apply_change_journal_batch and count_documents [:rpc_timeout] behaviour when deleting large sets or changing collection membership?

If so, did you find any specific triggers (particular metadata, file types, catalog options) or workarounds beyond “keep batches tiny”?

Are there any catalog maintenance steps (beyond deleting the state file and the standard maintenance commands) that improved this for you?

Thanks in advance for any insights.

David

Offline ejhutch

  • Member
  • **
  • Posts: 70
    • View Profile
Hi,
I've noticed this as well, and it makes large organization changes like moving or removing lots of folders from the catalog at once very time consuming.

Further, there seems to be a bug in folder selection in the "Browse" pane while browsing the catalog by Folder Path.  I can Shift-click or Control-Click folders that I want to move or remove.  But when I right click the selected folders and select "Remove Folder", only the last folder that was selected or the folder that I right-clicked on in the list of selected folders is actually removed.  The other folders appear to still be selected, but nothing actually happens to them. 

And removing a folder does seem to take an unusually long time for the operation to complete. Further, I wonder if these issues could also be related to this issue:  https://forums.camerabits.com/index.php?topic=17072.msg83049#msg83049 "Unable to remove folder or Update Folder Location from catalogs".

Photo Mechanic Plus version 2026.1, build 9024 Subscription
macOS Sequoia 15.7.2
« Last Edit: Yesterday at 10:06:48 AM by ejhutch »

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Hi ejhutch

Thanks for the link to that December message. There does seem to be a disappointing absence of support response to that, this & other messages. If that's related to my, & perhaps the others, being on the non subscription version then it would at least be helpful to know that.

I'm making large changes by only colour labelling batches (grey for delete, cyan for remove etc) as I work & running those later when I'm away from PM+ or at night but it's a poor solution & very limiting work wise.

You know that when it's totally stuck for hours, even after quit & restart, you can get it going again by deleting the cat_state files in the library? It's not broken anything for me yet but I've no idea what the risks are & I take no responsibility! You'll have to reintegrate after.

David

Offline ejhutch

  • Member
  • **
  • Posts: 70
    • View Profile
...
You know that when it's totally stuck for hours, even after quit & restart, you can get it going again by deleting the cat_state files in the library? It's not broken anything for me yet but I've no idea what the risks are & I take no responsibility! You'll have to reintegrate after.

Added PM and macOS system information in my previous post. I am subscribed. Also, I know about playing with the cat_state files, but am reluctant to mess with that unless absolutely necessary.  For now I seem to get by with moving folders outside of PM, then doing a catalog sync, then manually removing folders from the catalog one-by-one.  Not the best experience.

Personally, I think you should be able to Shift or Control Click items in both the Catalog view and the folder Navigator view and move them around like you can in the system Finder and File Explorer applications.  The behavior is somewhat inconsistent between both views, even accounting for the differences in functionality that need to be accounted for in each view.  The behavior could be tidied up considerably.

Oh, also see this thread:  https://forums.camerabits.com/index.php?topic=17087.0  Experiments in Updating a Folder Location