Yet another false hope. Issue popped up again.
Looking at the log there's Spotlight related errors right before it starts, but not sure what it means. Also, in addition to user ids 04 and 1104188992 I know have a user id 99 in the /private/var/folders... path.
Here's log entries from time period immediately before the mdworker errors associated with 504, note no errors (yet) on other ids.
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/Mac HD 320/.Spotlight-V100/Store-V2/E7AA3AF6-80B8-4495-81E5-6F154D834F80
Nov 1 01:37:45 Pro-2 com.apple.xpc.launchd[1] (com.apple.quicklook[2620]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Nov 1 01:37:45 Pro-2.local mds[34]: (DiskStore.Normal:1705) Starting health check...
Nov 1 01:37:45 --- last message repeated 5 times ---
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/Seagate 2TB/.Spotlight-V100/Store-V2/5EAD3D9D-6C8F-4A7E-92AC-2C219FE707D6
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/WD Green 2 TB/.Spotlight-V100/Store-V2/EDC8D163-5B16-43F3-BEFF-F511D3668289
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/WD320 Hitachi/.Spotlight-V100/Store-V2/1B85EFB9-D7CF-4687-A58C-A035CC86F027
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/WD 2TB G393/.Spotlight-V100/Store-V2/7515D292-486D-4083-8AFD-D70CE411F35D
Nov 1 01:37:45 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/WD 2TB G401/.Spotlight-V100/Store-V2/175E4A2D-8C29-4550-AA78-EADD4B814CF6
Nov 1 01:37:46 Pro-2 com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Starting index consistency check for /Volumes/Seagate 4TB/.Spotlight-V100/Store-V2/346EB2B6-C96A-4AD6-8CAF-777D4102AF29
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/WD320 Hitachi/.Spotlight-V100/Store-V2/1B85EFB9-D7CF-4687-A58C-A035CC86F027. Missing deletes:0
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/WD 2TB G401/.Spotlight-V100/Store-V2/175E4A2D-8C29-4550-AA78-EADD4B814CF6. Missing deletes:0
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/Seagate 4TB/.Spotlight-V100/Store-V2/346EB2B6-C96A-4AD6-8CAF-777D4102AF29. Missing deletes:0
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/Seagate 2TB/.Spotlight-V100/Store-V2/5EAD3D9D-6C8F-4A7E-92AC-2C219FE707D6. Missing deletes:0
Nov 1 01:37:46 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/WD 2TB G393/.Spotlight-V100/Store-V2/7515D292-486D-4083-8AFD-D70CE411F35D. Missing deletes:0
Nov 1 01:37:46 Pro-2.local mds[34]: (DiskStore.Warning:967) ReimportedAltNames repair issued for 0 items
Nov 1 01:37:47 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/WD Green 2 TB/.Spotlight-V100/Store-V2/EDC8D163-5B16-43F3-BEFF-F511D3668289. Missing deletes:0
Nov 1 01:37:47 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_checkDuplicateOids(void *, Boolean):Finished index consistency check for /Volumes/Mac HD 320/.Spotlight-V100/Store-V2/E7AA3AF6-80B8-4495-81E5-6F154D834F80. Missing deletes:0
Nov 1 01:37:47 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_consistencyCheck(void *, Boolean):Starting internal consistency check for /Volumes/Mac HD 320/.Spotlight-V100/Store-V2/E7AA3AF6-80B8-4495-81E5-6F154D834F80
Nov 1 01:37:47 Pro-2.local mds_stores[191]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Warning) IndexSDB in void si_consistencyCheck(void *, Boolean):Finished internal consistency check for /Volumes/Mac HD 320/.Spotlight-V100/Store-V2/E7AA3AF6-80B8-4495-81E5-6F154D834F80. Checks: 167955 Missing:0 Inconsistent:0 Missing deletes:0
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.FileSyncAgent.PHD.isRunning): The HideUntilCheckIn property is an architectural performance issue. Please transition away from it.
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mbloginhelper.user): This key does not do anything: OnDemand
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mbpluginhost.user): This key does not do anything: OnDemand
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.secd): This key does not do anything: OnDemand
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.secd): The ServiceIPC key is no longer respected. Please remove it.
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.speech.speechsynthesisd): This key does not do anything: OnDemand
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.TrustEvaluationAgent): This key does not do anything: OnDemand
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2624]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.sizing[2625]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:37:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:37:58 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2627]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:37:58 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:37:58 Pro-2 com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): The _DirtyJetsamMemoryLimit key is not available on this platform.
Nov 1 01:38:03 Pro-2.local com.apple.SecurityServer[57]: Session 100025 created
Nov 1 01:38:06 Pro-2.local mdworker[2630]: code validation failed in the process of getting signing information: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
Nov 1 01:38:07 Pro-2.local discoveryd[53]: Basic DNSResolver dropping message because it doesn't match the one sent Port:0 MsgID:256
Nov 1 01:38:07 Pro-2.local discoveryd[53]: Basic DNSResolver dropping message because it doesn't match the one sent Port:0 MsgID:34048
Nov 1 01:38:07 Pro-2.local discoveryd[53]: Basic Warn DD_Warn: Bad count; corrupt TXT RDATA
Nov 1 01:38:07 Pro-2.local discoveryd[53]: Basic DNSResolver dropping message because it doesn't match the one sent Port:0 MsgID:1
Nov 1 01:38:08 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2633]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:08 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:38:18 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2635]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:18 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:38:28 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2637]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:28 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:38:38 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2639]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:38 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:38:47 Pro-2.local mdworker[1219]: (Import.Normal:1286) Using too many resources after 320 files (wired: 0 resident: 436564 swapped: 2 regions: 912), hit usage threshold importing /Volumes/Mac HD 320/System/Library/CoreServices/Folder Actions Dispatcher.app, exiting to clean up now.
Nov 1 01:38:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2642]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:48 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 1 01:38:58 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles[2644]): Could not find uid associated with service: 0: Undefined error: 0 504
Nov 1 01:38:58 Pro-2 com.apple.xpc.launchd[1] (com.apple.mdworker.bundles): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.