问题描述
一旦使用Synchronization Timer
执行CSV文件中具有5000个值的JMeter脚本,View Results in Tree
中的响应数据就会显示以下错误:
Once JMeter script with 5000 values in CSV file is executed with Synchronization Timer
, Response data in View Results in Tree
shows following error:
java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
我在Google上找不到满意的答案.
I could not find the satisfactory answer yet on google.
有什么办法解决这个问题?
Is there any way to resolve this?
推荐答案
增加每个进程打开的文件句柄或文件描述符的数量.
Increase the number of open file handles or file descriptors per process.
您可以使用命令ulimit -a
找出每个进程允许多少个打开文件句柄.
You can use command ulimit -a
to find out how many open file handles per process is allowed.
$ ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 2048
virtual memory (kbytes, -v) unlimited
您会看到打开文件(-n)1024,这意味着每个进程仅允许1024个打开文件句柄.如果您的Java程序超出此限制,它将抛出java.net.SocketException: Too many files open
错误.
You can see that, open files (-n) 1024, which means only 1024 open file handles per process is allowed. If your Java program exceeds this limit, it will throw java.net.SocketException: Too many files open
error.
请参见这些线程 I/O异常(java.net .SocketException)和 java.net.SocketException:打开的文件太多.
这篇关于JMeter Ubuntu:java.net.SocketException:打开文件过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!