0

I'm using J-meter to run some load scenarios on a web-service.

I'm sending a request with seventy five concurrent users for thirty minutes but after about five minutes I got this error:

java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.Socket.bind(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
    at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at org.apache.jmeter.protocol.http.sampler.SoapSampler.sample(SoapSampler.java:271)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Unknown Source)
Sabir Khan
  • 9,826
  • 7
  • 45
  • 98
Ahmed Selim
  • 99
  • 1
  • 11

2 Answers2

0

If you're running JMeter on Windows Server 2008 R2 or Windows 7 you should apply KB2577795 HotFix

If you're running JMeter on Linux, add the following line to /etc/security/limits.conf:

foo soft nofile 4096
foo hard nofile 65536

Where foo should be your Linux username

Also set a hard limit by running the next command:

ulimit -n 8192

Also check out the following references:

Community
  • 1
  • 1
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

Beside this potential duplicate:

Uou should not use SoapSampler anymore.

Read this for up to date way to test Soap WS:

Besides, ensure you use last JMeter version.

Community
  • 1
  • 1
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • I tried this solution but unfortunately it doesn't work – Ahmed Selim Aug 11 '16 at 11:31
  • What error do you get ? Are you sure the changes have been applied ? Can you describe what you changed ? – UBIK LOAD PACK Aug 11 '16 at 11:35
  • I deployed the new hot fix for windowse server 2008 R2, Increase heap size to the maximum available, increasing the number of max TCP/IP connections, increasing the number of MaxUserPort and decrease the number of concurrent requests – Ahmed Selim Nov 08 '16 at 09:09