This happened in the past with the Java bulk API on Linux.
During dmsdk test runs where we read 100,000 documents from the database, larger batch sizes (100 and above) result in hundreds of thousands of temp files being opened and not closed until the test is shutdown. This results in a shortage of open file descriptors. In one case (batches of size 500), more than 1.2M descriptors were open simultaneously. Telltale signs are a plethora of messages like this:
INFO: File /tmp/MIME7250643930506885814.tmp was not deleted
Sep 27, 2016 2:44:38 PM org.jvnet.mimepull.WeakDataFile close
This is confirmed by counting the number of open files with lsof and grepping for "MIME".
Libraries:
client-api-java-4.0-20160916
data-movement-1.0-SNAPSHOT.jar (20160922)