java


Unable to solve “Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread” when testing with multiple threads in JMeter


I am load testing MQTT connection with JMeter.
The test runs in NON-GUI mode.
All listeners were disabled during the test.
Everything was fine until I increased thread number from 2k to 3k. Now, this error occurs when I am running the test:
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread. See log file for details.
I tried increasing the HEAP size by editing the executable file "jmeter"
Here is how I edited it. I changed it from 512m to 1024m:
But it doesn't work. Then I changed to a larger value 2048m, still doesn't work.
I searched for this problem and found out that it might have something to do with the thread stack size. Some pointed out that I may set the thread stack size in the script too. So I tried adding the thread stack size in the executable file.
This is how I did it:
I am not sure if it is the correct way. It didn't work too.
Some also says that maybe the HEAP size or the Thread stack size of the JVM should be increased.
Then I came across this tutorial by MKYoung:https://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/
stating the ways to change the HEAP size and the thread stack size of java.
But for setting to work I have to state a java class file at the end of the command.
java -Xss256k <class name here>
But the Jmeter is unix executable and there doesn't seem to be any java class files there.
I am really running out of ways. Please help.
Execute ulimit -u command (shows max user processes) and amend it according to number of threads you are trying to use (and a little bit more so other processes could operate), check out How to change default number of max process per user in linux thread for details.
Apart from this make sure you are following recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide.

Related Links

Using google static maps - JFrame or Javascript
How to put a button texture on another texture?
In Java, can you use negative one with substring? [closed]
Resizing image with libgdx
Libgdx serialization
ArrayOutOfBounds exception when trying to parse Double to String
Can methods be referred to as functions in comments [closed]
Positioning button on the TableActivity from the code
Infinispan Clustering applications on 2 servers
How to use a random array number and a timer in java?
How can I write a method to intersperse two arrays of different lengths?
Returning null values in DAO file
Using foreach loop in JSF
How to send message using SMACK API and GTALK?
LDAP search bootstrap example
Unable To Increase UrlImageView Size! (Android)

Categories

HOME
clips
netsuite
minimum-spanning-tree
single-sign-on
hashmap
objectgears
adb
elm
microservices
electronics
webpack-2
google-project-tango
installshield
opengl-es-2.0
communication
postgres-xl
spring-tool-suite
gz
visual-studio-cordova
dynamics-crm-online
progressive-web-apps
windows-7-x64
immutable.js
nas
conemu
object-detection
graphicsmagick
google-search-api
shopware
centos6.5
traffic
maquette
replaceall
dbclient
compatibility
libuv
gitignore
newline
fog
commit
openoffice.org
mozilla
force-layout
picasso
nssegmentedcontrol
space-complexity
uft-api
acoustics
qcombobox
osx-mavericks
appcompat
network-flow
komodoedit
brightcove
google-perftools
r-forge
ifs
arrow-keys
sqldf
smart-table
objective-c-swift-bridge
yt-project
static-ip-address
skobbler-maps
xml-attribute
clang-static-analyzer
flash-cs5
ipconfig
netmq
natvis
iad
srand
jms2
google-places
content-length
angular-leaflet-directive
embedded-code
ideamart
appfabric-cache
unity3d-gui
modalpopup
javafx-webengine
qcodo
android-radiobutton
aapt
fluentautomation
coverflow
orchardcms-1.7
ocx
appconkit
bubble-chart
mercurial-server
blackberry-playbook
datareader
dentrix
virtual-functions

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App