You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ragini Thakur <ra...@cybage.com> on 2011/04/07 08:49:43 UTC

java.net.SocketException: Too many open files

Hi,

 

While running load test in distributed mode we observed the
"java.net.SocketException: Too many open files" on the slave where
Jmeter was executed in server mode. Can anyone tell why this exception
is thrown? I never observed this exception any time before.

 

 

The complete stack trace is as below.

 

Created remote object: UnicastServerRef [liveRef:
[endpoint:[10.3.1.62:41728](local),objID:[70c181c5:12f2e03530e:-7fff,
-9053872638812208603]]]

Starting the test on host 10.3.1.62:1099 @ Wed Apr 06 19:34:35 PST 2011
(1302147275469)

Apr 6, 2011 7:51:44 PM sun.rmi.transport.tcp.TCPTransport$AcceptLoop
executeAcceptLoop

WARNING: RMI TCP Accept-0: accept loop for
ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=41728] throws

java.net.SocketException: Too many open files

        at java.net.PlainSocketImpl.socketAccept(Native Method)

        at
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:358
)

        at java.net.ServerSocket.implAccept(ServerSocket.java:470)

        at java.net.ServerSocket.accept(ServerSocket.java:438)

        at
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTrans
port.java:387)

        at
sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:359)

        at java.lang.Thread.run(Thread.java:636)

 

Test environment: Linux

Jmeter version 2.4

Test run duration: 60 mins

 

Please let me know in case any I shall provide any other information.

 

 

Regards,

Ragini Thakur

 



"Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment." 
www.cybage.com


Re: java.net.SocketException: Too many open files

Posted by Adrian Speteanu <as...@gmail.com>.
Note that ulimit -n gives the limit per user, you should also check the
limitation per system as well.
Any socket exception are obviously related to the OS and / or network.

On linux, this problem in particular is related to the fact that linux
treats open sockets as open file descriptors. And file descriptors are
limited to a "safe" value for various reasons - until someone actually needs
more for a particular task and then this can be easily configured. If JMeter
needs to open several hundreds sockets (and considering that some stay open
a while after the thread has finished with them) it is easy to run into this
issue, because other processes need to use file descriptors.

Similar tweaks can be done on Windows as well, though I'm not sure, you'd
get the same error message, on XP it was easy to run into running out of
available sockets because they were limited to 5000. However, Win 7 has been
generally configured to permit many open sockets and I haven't had problems
with running scripts that open 4-5000 threads in jmeter and as many
connections as they can (not recommended for actual tests, I was looking for
how much it can take).

This can be affected by how the test is configured as well (using keep alive
for example, but by many other factors also).

On Thu, Apr 7, 2011 at 10:43 AM, Ragini Thakur <ra...@cybage.com> wrote:

> What is the cause of this exception its OS issue or application?
>
> Regards,
> Ragini Thakur
>
> -----Original Message-----
> From: Felix Frank [mailto:ff@mpexnet.de]
> Sent: Thursday, April 07, 2011 1:08 PM
> To: JMeter Users List
> Subject: Re: java.net.SocketException: Too many open files
>
> On 04/07/2011 08:49 AM, Ragini Thakur wrote:
> > Hi,
> >
> >
> >
> > While running load test in distributed mode we observed the
> > "java.net.SocketException: Too many open files" on the slave where
> > Jmeter was executed in server mode. Can anyone tell why this exception
> > is thrown? I never observed this exception any time before.
>
> Hi,
>
> as a first step, you can check your open files limit using "ulimit -n".
>
> Raise it if necessary.
>
> HTH,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
> "Legal Disclaimer: This electronic message and all contents contain
> information from Cybage Software Private Limited which may be privileged,
> confidential, or otherwise protected from disclosure. The information is
> intended to be for the addressee(s) only. If you are not an addressee, any
> disclosure, copy, distribution, or use of the contents of this message is
> strictly prohibited. If you have received this electronic message in error
> please notify the sender by reply e-mail to and destroy the original message
> and all copies. Cybage has taken every reasonable precaution to minimize the
> risk of malicious content in the mail, but is not liable for any damage you
> may sustain as a result of any malicious content in this e-mail. You should
> carry out your own malicious content checks before opening the e-mail or
> attachment."
> www.cybage.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: java.net.SocketException: Too many open files

Posted by Adrian Speteanu <as...@gmail.com>.
ulimit -n is usually at 1024 on latest debian / ubuntu distributions. that
is a little too small for web-applications & performance tests. it can be
increased to 10-30,000, though I agree a check on the test should be done.

On Thu, Apr 7, 2011 at 9:57 PM, Deepak Shetty <sh...@gmail.com> wrote:

> The OS limits these things for a good reason . you might actually need more
> than the limit set on your operating system  or your application is using
> up
> more than it should need. In the case of JMeter it is *usually* the case
> that you have specified too many threads concurrently without increasing
> the
> limits on your OS
>
> On Thu, Apr 7, 2011 at 12:43 AM, Ragini Thakur <ra...@cybage.com> wrote:
>
> > What is the cause of this exception its OS issue or application?
> >
> > Regards,
> > Ragini Thakur
> >
> > -----Original Message-----
> > From: Felix Frank [mailto:ff@mpexnet.de]
> > Sent: Thursday, April 07, 2011 1:08 PM
> > To: JMeter Users List
> > Subject: Re: java.net.SocketException: Too many open files
> >
> > On 04/07/2011 08:49 AM, Ragini Thakur wrote:
> > > Hi,
> > >
> > >
> > >
> > > While running load test in distributed mode we observed the
> > > "java.net.SocketException: Too many open files" on the slave where
> > > Jmeter was executed in server mode. Can anyone tell why this exception
> > > is thrown? I never observed this exception any time before.
> >
> > Hi,
> >
> > as a first step, you can check your open files limit using "ulimit -n".
> >
> > Raise it if necessary.
> >
> > HTH,
> > Felix
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
> > "Legal Disclaimer: This electronic message and all contents contain
> > information from Cybage Software Private Limited which may be privileged,
> > confidential, or otherwise protected from disclosure. The information is
> > intended to be for the addressee(s) only. If you are not an addressee,
> any
> > disclosure, copy, distribution, or use of the contents of this message is
> > strictly prohibited. If you have received this electronic message in
> error
> > please notify the sender by reply e-mail to and destroy the original
> message
> > and all copies. Cybage has taken every reasonable precaution to minimize
> the
> > risk of malicious content in the mail, but is not liable for any damage
> you
> > may sustain as a result of any malicious content in this e-mail. You
> should
> > carry out your own malicious content checks before opening the e-mail or
> > attachment."
> > www.cybage.com
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
>

Re: java.net.SocketException: Too many open files

Posted by Deepak Shetty <sh...@gmail.com>.
The OS limits these things for a good reason . you might actually need more
than the limit set on your operating system  or your application is using up
more than it should need. In the case of JMeter it is *usually* the case
that you have specified too many threads concurrently without increasing the
limits on your OS

On Thu, Apr 7, 2011 at 12:43 AM, Ragini Thakur <ra...@cybage.com> wrote:

> What is the cause of this exception its OS issue or application?
>
> Regards,
> Ragini Thakur
>
> -----Original Message-----
> From: Felix Frank [mailto:ff@mpexnet.de]
> Sent: Thursday, April 07, 2011 1:08 PM
> To: JMeter Users List
> Subject: Re: java.net.SocketException: Too many open files
>
> On 04/07/2011 08:49 AM, Ragini Thakur wrote:
> > Hi,
> >
> >
> >
> > While running load test in distributed mode we observed the
> > "java.net.SocketException: Too many open files" on the slave where
> > Jmeter was executed in server mode. Can anyone tell why this exception
> > is thrown? I never observed this exception any time before.
>
> Hi,
>
> as a first step, you can check your open files limit using "ulimit -n".
>
> Raise it if necessary.
>
> HTH,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
> "Legal Disclaimer: This electronic message and all contents contain
> information from Cybage Software Private Limited which may be privileged,
> confidential, or otherwise protected from disclosure. The information is
> intended to be for the addressee(s) only. If you are not an addressee, any
> disclosure, copy, distribution, or use of the contents of this message is
> strictly prohibited. If you have received this electronic message in error
> please notify the sender by reply e-mail to and destroy the original message
> and all copies. Cybage has taken every reasonable precaution to minimize the
> risk of malicious content in the mail, but is not liable for any damage you
> may sustain as a result of any malicious content in this e-mail. You should
> carry out your own malicious content checks before opening the e-mail or
> attachment."
> www.cybage.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

RE: java.net.SocketException: Too many open files

Posted by Ragini Thakur <ra...@cybage.com>.
What is the cause of this exception its OS issue or application?

Regards,
Ragini Thakur

-----Original Message-----
From: Felix Frank [mailto:ff@mpexnet.de] 
Sent: Thursday, April 07, 2011 1:08 PM
To: JMeter Users List
Subject: Re: java.net.SocketException: Too many open files

On 04/07/2011 08:49 AM, Ragini Thakur wrote:
> Hi,
> 
>  
> 
> While running load test in distributed mode we observed the
> "java.net.SocketException: Too many open files" on the slave where
> Jmeter was executed in server mode. Can anyone tell why this exception
> is thrown? I never observed this exception any time before.

Hi,

as a first step, you can check your open files limit using "ulimit -n".

Raise it if necessary.

HTH,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



"Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment." 
www.cybage.com



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: java.net.SocketException: Too many open files

Posted by Felix Frank <ff...@mpexnet.de>.
On 04/07/2011 08:49 AM, Ragini Thakur wrote:
> Hi,
> 
>  
> 
> While running load test in distributed mode we observed the
> "java.net.SocketException: Too many open files" on the slave where
> Jmeter was executed in server mode. Can anyone tell why this exception
> is thrown? I never observed this exception any time before.

Hi,

as a first step, you can check your open files limit using "ulimit -n".

Raise it if necessary.

HTH,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org