Connection limit on Windows

681 views
Skip to first unread message

Brian Bo

unread,
Mar 26, 2015, 9:06:31 PM3/26/15
to gat...@googlegroups.com
I'm running Gatling 2.0 on Windows 7 and try to simulate a large number of users hitting our server. When I run my Gatling test with 20000 sessions, I get the following errors a few minutes after the test starts:

java.net.ConnectException: No buffer space available (maximum connections reached?): connect

The number of connections by querying netstat (netstat -an | wc -l) during the test has an upper limit of 16489. And then I try the same test on a Windows 2008 server r2 machine, the limit is around 10107.

Is there a limit of open connections on Windows? Or is there anything else that is preventing Gatling to have more sessions?

Any suggestion is appreciated.

Thanks,
Brian

Stéphane LANDELLE

unread,
Mar 27, 2015, 5:16:03 AM3/27/15
to gat...@googlegroups.com

Stéphane Landelle
Lead developer


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Bo

unread,
Mar 27, 2015, 1:02:59 PM3/27/15
to gat...@googlegroups.com
I read this page while I was Googling for a resolution too... but I ran "net config server" on both my local Win7 and my Windows 2008 server machine, they return the same Maximum open files per session (16384), however, the actual limit when I ran the test was different. (see above)

Also, I don't find a way to change that number....

Brian

Stéphane LANDELLE

unread,
Mar 27, 2015, 1:13:38 PM3/27/15
to gat...@googlegroups.com
You should ask on a Windows forum...

Stéphane Landelle
Lead developer


Brian Bo

unread,
Apr 1, 2015, 2:55:14 PM4/1/15
to gat...@googlegroups.com
After a few days of researching I still  have no luck changing the limit on Windows. So I decide to live with it. 

However, even if running with 1500 sessions, the number of TCP connections keep going up and eventually hit the upper limit. Why is the connection not closed after the session finishes? I tried to set "allowPoolingConnections = false" and "allowPoolingSslConnections = false" in gatling.conf and it doesn't seem to help.

Brian

Stéphane LANDELLE

unread,
Apr 1, 2015, 3:13:29 PM4/1/15
to gat...@googlegroups.com
However, even if running with 1500 sessions, the number of TCP connections keep going up and eventually hit the upper limit. Why is the connection not closed after the session finishes?

They are closed after the session finishes.
 
I tried to set "allowPoolingConnections = false" and "allowPoolingSslConnections = false" in gatling.conf and it doesn't seem to help.

Your issue is probably related to TIME_WAIT

Brian Bo

unread,
Apr 1, 2015, 9:25:21 PM4/1/15
to gat...@googlegroups.com
I don't think I made any changes but when I run my script again this afternoon number of TCP connections do not keep increasing anymore.... so it could be some issues with the server side (maybe the server didn't close the connection?)

Anyways, thanks for the help on these topics.

Brian

Stéphane LANDELLE

unread,
Apr 2, 2015, 2:34:29 AM4/2/15
to gat...@googlegroups.com
You should probably check the state of your TCP connections, like those in CLOSE_WAIT.

Stéphane Landelle
Lead developer


--
Reply all
Reply to author
Forward
0 new messages