Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 404965

Summary: Copying large directory trees runs out of file handles
Product: [ECD] Orion Reporter: Ken Walker <ken_walker>
Component: NodeAssignee: Project Inbox <orion.server-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ken Walker CLA 2013-04-04 22:00:02 EDT
If you copy a large directory tree to another location in the Orionode server you will likely get:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: EMFILE, open '/Users/kwalker/Desktop/Workspace/org.eclipse.orion.client/modules/orionode/.workspace/b/express/lib/node_modules/connect/lib/public/icons/page_white_csharp.png'

I've seen several posts regarding having to hang on to requests as you hit magical limits.  I don't want to have to resort to setting a larger limit on the process outside of Orion necessarily.
Comment 1 Mark Macdonald CLA 2013-04-09 12:15:18 EDT
Our dir copy code ('copy' in fileUtils.js) is naive. It opens a ton of read and write requests against the filesystem with no upper limit.

Should look at a wrapper around 'fs' that throttles the number of open file handles, this would keep the whole server process under the limit.
Comment 2 John Arthorne CLA 2015-05-05 14:46:27 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html