1 year ago

#114058

test-img

Nasir Islam Sujan

Benchmarking 1.1.1.1 (be patient) socket: Too many open files (24)

I'm new to Linux. I have an Apache Tomcat project running on CentOS 6. Currently, I'm facing problem to serve concurrent users request. So I give a load test using Apache HTTP server benchmarking tool ab.

When I load test on the hosted server (1.1.1.1) using below command, it's work fine.

ab -n 40000 -c 4000 http://1.1.1.1:9567/users

But when I try to run the same command from another Linux server (2.2.2.2) below error message was shown:

Benchmarking 1.1.1.1 (be patient) socket: Too many open files (24)

But if I decrease the concurrent users -c value to 1020 it works fine.

-c greater than 1020 not works and show above message.

Here are some configuration of hosted server (1.1.1.1):

[root@qapps /]# ulimit -n
500000

# process limits
[root@qapps /]# cat /proc/5403/limits 
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             257573               257573               processes
Max open files            500000               500000               files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       257573               257573               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

[root@qapps /]# cat /etc/security/limits.conf

#<domain>      <type>  <item>         <value>
*                   soft    nofile 500000
*                   hard    nofile 500000
apache              soft    nofile 500000
apache              hard    nofile 500000

I went through similar SO questions, but unable to find the solution.

java

centos6

tomcat9

0 Answers

Your Answer

Accepted video resources