Answered question

Why do I get "Too many open files" on my Linux load generator's?

My tests are failing and in the logs I see my load generators getting many of the following errors:
neoload.LG: Can't get CPU/Network/TCP info /proc/net/dev (Too many open files)
What does this mean and how do I fix this so I can run a load test?

During the load test, the load generator may use many resources on your machine. One of these resources are the number of sockets that needs to be opened at the same time on the computer.


On Linux, sockets, files, directories...are file descriptors. By default, the number of file descriptors that can be opened at the same time is 1024.

Since the load generator will open many sockets, that default value is too low. In that case, the system will raise that error of "Too many open files".


The command "ulimit -n" provides you the current configured value. To avoid the "Too many open files" message, you have to increase the default value.


We recommend you to increase it up to 65534 using that command "ulimit -n 65534" (or consult your Systems Administrator) To persist that modification, you have to modify that file: "/etc/security/limits.conf"


Here is an example of configuration:


neoload  soft     nofile  4092
neoload  hard     nofile  65534


Here is the user used to start your Neoload Agent. A reboot is needed to apply the modification. The new ulimit value is available on the load generator logs available on the Neoload interface.

With that new configuration, your load generator will fully use your machine's resources.


For more information about that error, see sections Troubleshooting guide in NeoLoad documentation.

Did you find this useful ?

No (0)

Yes (0)

0% of users found this answer useful