I don't have a lot to say, but this is my little bit.

Wednesday, December 15, 2010

Fix "Address already in use: connect" when using JMeter

Recently when using Jmeter to benchmark a piece of server software, I ran into a problem which prevented Jmeter from generating requests. The error, as reported in the View Results Tree, was Address already in use: connect.

That error originates deep within Windows which limits the amount of sockets which can be created in a certain amount of time. I encountered it when generating thousands or tens of thousands of connections per minute.

The problem is that the sockets, even though closed, still exist in memory because they have not timed out yet. Specifically, their keep-alive flag is set, so they are "closed" but also "alive". Thus, the solution is to go to the HTTP Request part of the test and uncheck Use KeepAlive. Having done this, I can generate a huge number of connections without any problem.

No comments:

Post a Comment