That's InterSystems IRIS logs. You need OS logs, namely syslog (check /var/log/syslog or /var/log/messages). Search for log entries about the "killed process" around the time your process was killed.

To be extra sure run write $job before calling the query to get process id. It should match the id of a killed process.

After you establish that your process was killed by OOM you need to report that to WRC, as a fix probably requires if not access, then at least overview of the production configuration which causes it.

Let's see how much time does it take to run in a non web context. There would be no timeouts in that case.

Could you please run this in your interoperability namespace:

set start=$h,rs=##class(Ens.InterfaceMaps.Utils).EnumeratePathsFunc(),end=$h
write "Time in seconds: ", $p(end, ",", 2)-$p(start, ",", 2)

If you run the query in SMP with parameters set them here too. EnumeratePaths query docs.

Also after you obtain the result set, you can output it to a terminal using %Display method, or to a file using %DisplayFormatted method.

Absolutely not.

During SYNC or REBUILD events Data Quality Manager cubes would only read patient index linkage definition data.

There's no way for cubes to modify patient index linkage definition data.

That said, reads, cube data writes, and additional cpu load during SYNC or REBUILD events might impact the running system, since there's a limited amount of resources available. You might want to schedule SYNCs and especially REBUILDs for low-load times (at nights or weekends depending on your usage patterns).

Using async reporting mirror for cubes would completely remove the impact on the patient index.