java.lang.OutOfMemoryError: GC overhead limit exceeded on WSO2 MB <p>I've been recently working on with the <code>WSO2 Message Broker</code> (Ver : 3.1.0 ) in order to publish and consume messages using <code>JMeter</code> as the jms client. So I've got my publisher Java program where I'm publishing the messages from and I'm trying to publish 4000 messages per second. I could provide the snippet if necessary.</p> <p>I'm consuming those messages by running a <code>JMeter</code> command <code>jmeter -n -t C:\Users\ctsadmin\Downloads\wso2MB\apache-jmeter-2.13\bin\GamesSubscriber.jmx -l C:\Users\ctsadmin\Downloads\wso2MB\apache-jmeter-2.13\bin\mytest_results.jtl</code> in headless mode. I kept the <code>VisualVm</code>window opened as well to see the memory consumption for the test. For the first 15 minutes the publishing and consuming has been ok according to the image below, but there after, all of sudden the <code>VisualVm</code> shows a hype and runs out of memory. I'm attaching a screenshot of the <code>VisualVM</code> below.</p> <p><a href="https://i.stack.imgur.com/GNB3Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GNB3Y.png" alt="Screenshot of the CPU usage"></a></p> <p>I've checked the <code>heap dump</code> of the <code>WSO2 MB</code> using <code>JProfiler</code> as well. Have attached a screenshot of it too. <a href="https://i.stack.imgur.com/wipJO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wipJO.png" alt="enter image description here"></a></p> <p>What could be the issue? And what changes should I make? Something like increasing the <code>heap</code> size? Any help would be aprreciated.</p> <p><strong>EDIT</strong>: I'm <a href="https://onedrive.live.com/redir?resid=22E6B19629C9077D!259638&amp;authkey=!AKif8Eu6sBnleiw&amp;ithint=folder%2chprof" rel="nofollow noreferrer">hereby</a> attaching the log file and the heap dump. </p>