From https://discourse.openondemand.org/t/ood-server-out-of-memory-caused-by-file-manager/4664, when the Files app opens into a very large directory (800k files in the example), it goes a short while before throwing a Proxy Error alert to the user. This fails to stop the ruby process, which continues until it runs out of memory.
Ideally we make sure that backend files operations stop when an error is encountered, and/or include a configurable number of files beyond which the files app will not even try.