3

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

I could not find the satisfactory answer yet on google.

Is there any way to resolve this?

2
  • Are you opening that file 5000 times? That's bad approach. You could load your values just once and create some Beanshell logic to use that values as you need... Commented Aug 5, 2016 at 9:21
  • No, just once. CSV contains 5000 Email values. Commented Aug 5, 2016 at 9:26

1 Answer 1

3

Increase the number of open file handles or file descriptors per process.

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

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.

See these threads I/O exception (java.net.SocketException) and java.net.SocketException: Too many open files.

Sign up to request clarification or add additional context in comments.

1 Comment

I used root to login and executed these commands. But when I switched to other ordinary user, I found the open files number was the original value. Could I configure the number of open file handles for all users?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.