Reputation: 120298
So I need to peg a system with several thousand long polling requests.
I created a thread group with the requisite number of requests. A few things confuse me.
(Im on a mac)
I run the jmeter.sh script to start the gui. I cant run the test unless I run jmeter-server. Without it I get a "cannot connect to 127.0.0.1..." message. The docs don't mention needing to start this script up.
In the jmeter.sh script I set the max memory to export JVM_ARGS="-Xms4096m -Xmx4096m"
. Nonetheless, whenever I start running the test I immediately see
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread. See log file for details.
Any advice? Thanx in advance.
Upvotes: 0
Views: 167
Reputation: 4537
This doesn't make sense. you shouldn't need to run jmeter-server unless you have a need to run meter in server mode, say with remote engines.
Depending on the version of java you are running you are likely exceeding the memory space available to the JVM used by jmeter. Not sure why you are allocating 4 GB. You should be fine with 512M or perhaps 1024M. I have found that Jmeter can tend to leak over time anyway.
Your headless test should give you an indication that you are either running out of memory or thread space with Jmeter or perhaps, and more likely, you are overburdening your server, probably exhausting the thread pool.
First thing I would do is change the memory to something more conservative, say -Xms1024m -Xmx1024m. Also, 40-50k requests is not 40-50k threads. They are concepts that work with each other but are not necessarily the same thing. So perhaps you are setting something up in Jmeter destined to fail by creating too many concurrent threads.
Upvotes: 1