title: java.lang.RuntimeException: Cannot create RandomBufferedReader java.io.FileNotFoundException: XXX.csv (Too many open files)
body: <p>I am working on a Jmeter performance Test, where I am using <code>random-csv-data-set</code> plugin. However, When I am using 600 threads I am getting and error like this one.</p>
  
  <pre><code>2019-03-13 19:22:11,410 INFO o.a.j.t.JMeterThread: Thread started: Student Login 1-60
  2019-03-13 19:22:11,412 INFO o.a.j.t.JMeterThread: Thread started: Student Login 1-61
  2019-03-13 19:22:11,411 ERROR c.b.c.RandomCSVReader: Cannot create RandomBufferedReader
  java.io.FileNotFoundException: /XXXX/keyword-search.csv (Too many open files)
      at java.io.RandomAccessFile.open0(Native Method) ~[?:1.8.0_191]
      at java.io.RandomAccessFile.open(RandomAccessFile.java:316) ~[?:1.8.0_191]
      at java.io.RandomAccessFile.&lt;init&gt;(RandomAccessFile.java:243) ~[?:1.8.0_191]
      at com.blazemeter.csv.RandomCSVReader$1.initialValue(RandomCSVReader.java:34) [jmeter-plugins-random-csv-data-set-0.6.jar:?]
      at com.blazemeter.csv.RandomCSVReader$1.initialValue(RandomCSVReader.java:30) [jmeter-plugins-random-csv-data-set-0.6.jar:?]
      at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180) [?:1.8.0_191]
      at java.lang.ThreadLocal.get(ThreadLocal.java:170) [?:1.8.0_191]
      at com.blazemeter.csv.RandomCSVReader.readLineWithSeek(RandomCSVReader.java:160) [jmeter-plugins-random-csv-data-set-0.6.jar:?]
      at com.blazemeter.jmeter.RandomCSVDataSetConfig.readRandom(RandomCSVDataSetConfig.java:78) [jmeter-plugins-random-csv-data-set-0.6.jar:?]
      at com.blazemeter.jmeter.RandomCSVDataSetConfig.iterationStart(RandomCSVDataSetConfig.java:55) [jmeter-plugins-random-csv-data-set-0.6.jar:?]
      at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399) [ApacheJMeter_core.jar:5.0 r1840935]
      at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391) [ApacheJMeter_core.jar:5.0 r1840935]
      at org.apache.jmeter.control.GenericController.next(GenericController.java:160) [ApacheJMeter_core.jar:5.0 r1840935]
      at com.blazemeter.jmeter.control.VirtualUserController.next(VirtualUserController.java:37) [jmeter-plugins-casutg-2.7.jar:?]
      at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:87) [ApacheJMeter_core.jar:5.0 r1840935]
      at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:251) [ApacheJMeter_core.jar:5.0 r1840935]
  </code></pre>
  
  <p>I am using:</p>
  
  <ol>
  <li>Jmeter 5.1</li>
  <li><code>jmeter-plugins-random-csv-data-set-0.6.jar</code></li>
  </ol>
  
  <p>I increased the number of files that can be opened in my machine:</p>
  
  <pre><code>me:~$ ulimit -a 
  core file size          (blocks, -c) 0
  data seg size           (kbytes, -d) unlimited
  file size               (blocks, -f) unlimited
  max locked memory       (kbytes, -l) unlimited
  max memory size         (kbytes, -m) unlimited
  open files                      (-n) 1024
  pipe size            (512 bytes, -p) 1
  stack size              (kbytes, -s) 8192
  cpu time               (seconds, -t) unlimited
  max user processes              (-u) 1418
  virtual memory          (kbytes, -v) unlimited
  </code></pre>
  
  <p>Still no luck. 
  Any thoughts ?</p>