我正在使用J random-csv-data-set
插件进行Jmeter性能测试。但是,当我使用600个线程时,却出现这种错误。
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.<init>(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]
我正在使用:
jmeter-plugins-random-csv-data-set-0.6.jar
我增加了可以在本机中打开的文件数:
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
仍然没有运气。 有什么想法吗?