I'm experimenting with bulk-loading XML files by spawning background
tasks to load a set of files.   I ran into this just now ..

 

 

2010-01-21 16:42:15.718 Notice: TaskServer: SVC-FILOPN:
xdmp:document-load("H:\MarkLogic\NDC/249106.xml", <options
xmlns="xdmp:document-load"><uri>/NDC/249106.xml</uri><repair>none</repai
r></options>) -- File open error: open 'H:\MarkLogic\NDC/249106.xml':
Too many open files

 

 

Is there any setting in the ML server to increase the # of file handles
?
Even if so, this is strange, because it seems to imply a file handle
leak.  There are only 4 task server threads, surely 4 files isnt too
many.  The conclusion must be that this code doesnt close the file
handes.

 

Here's the xquery which is being spawned.

 

Its being passed a list of 100 or 1000 files to iteratively load.

 

=============================

 

declare variable $files external;


for $f in $files/file 
    return 
    if( fn:ends-with( $f/@uri , "/" ) ) then
        () (: Create directory :)
    else 
        xdmp:document-load($f/@file/fn:string(), 
            <options xmlns="xdmp:document-load">
              <uri>{$f/@uri/fn:string()}</uri>
              <repair>none</repair>
            </options>) 

 

 

 

 

 

 

 

 

----------------------------------------

David A. Lee

Senior Principal Software Engineer

Epocrates, Inc.

[email protected]

812-482-5224

 

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to