jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError: Java heap space
As usual I turned to google and found out that this error can be forgone by increasing the Java heap space.
This line in jmeter.bat or jmeter.sh script which tells the launching instance of JMeter how much heap size it should use.
JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh
I changed it to -Xms1024m at both places and relaunched JMeter. (Please Note that your system that has JMeter setup has sufficient RAM )
It FIXed the problem.
I am able to test the application now, crossing the previous 30k sample and going beyond till I stop the test manually.
Also I found the below article with a couple of more fixes that you might need in case you are facing the above error still.