Created attachment 22122 [details] screenshot of recorded samples Setup: Version: 2.3.1 started with proxy settings via command line. OS: XP Java : 1.6.0_06-b02 Browser: Firefox 2.0.0.14 Browser: Internet Explorer 6.0.29xxx Websites: http://www.k-plus-s.com, http://jakarta.apache.org/jmeter/ C:\java\jakarta-jmeter-2.3.1\bin>jmeter.bat -H http-proxy-xxxxx.net -P 8080 -N localhost Actions: A proxy on port 9090 was set up with an inclusion of '.*' and started. Both browswers were tested. Every character that was recorded was filled prefixed by ${} like shown in the screenshot. Result: The jmeter.log looks OK: 2008/06/13 10:04:14 INFO - jmeter.protocol.http.proxy.Daemon: Creating Daemon Socket... on port 9090 2008/06/13 10:04:14 INFO - jmeter.protocol.http.proxy.Daemon: Proxy up and running! The following stacktrace is shown on the console: Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.jmeter.util.StringUtilities.substitute(StringUtilities.java:47) at org.apache.jmeter.engine.util.ReplaceFunctionsWithStrings.transformValue(ReplaceFunctionsWithStrings.java:92) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:121) at org.apache.jmeter.engine.util.ValueReplacer.reverseReplace(ValueReplacer.java:85) at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:867) at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:385) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:241) Exception in thread "Thread-22" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.jmeter.util.StringUtilities.substitute(StringUtilities.java:47) at org.apache.jmeter.engine.util.ReplaceFunctionsWithStrings.transformValue(ReplaceFunctionsWithStrings.java:92) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:121) at org.apache.jmeter.engine.util.ValueReplacer.reverseReplace(ValueReplacer.java:85) at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:867) at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:385) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:241) Exception in thread "Thread-24" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.jmeter.util.StringUtilities.substitute(StringUtilities.java:47) at org.apache.jmeter.engine.util.ReplaceFunctionsWithStrings.transformValue(ReplaceFunctionsWithStrings.java:92) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:121) at org.apache.jmeter.engine.util.ValueReplacer.reverseReplace(ValueReplacer.java:85) at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:867) at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:385) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:241) Exception in thread "Thread-23" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuffer.append(Unknown Source) at org.apache.jmeter.util.StringUtilities.substitute(StringUtilities.java:47) at org.apache.jmeter.engine.util.ReplaceFunctionsWithStrings.transformValue(ReplaceFunctionsWithStrings.java:92) at org.apache.jmeter.engine.util.ValueReplacer.replaceValues(ValueReplacer.java:121) at org.apache.jmeter.engine.util.ValueReplacer.reverseReplace(ValueReplacer.java:85) at org.apache.jmeter.protocol.http.proxy.ProxyControl.replaceValues(ProxyControl.java:867) at org.apache.jmeter.protocol.http.proxy.ProxyControl.deliverSampler(ProxyControl.java:385) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:241) Exception in thread "Thread-21" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-19" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-18" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-17" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-16" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-15" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-14" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-12" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-11" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-8" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-10" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-9" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-69" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-67" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-68" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-66" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-65" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-64" java.lang.OutOfMemoryError: Java heap space Exception in thread "Thread-63" java.lang.OutOfMemoryError: Java heap space
The comman "set HEAP=-Xms256m -Xmx1024m" in jmeter.bat shows the same result. The java process takes up to 1 GB. In the proxy settings of JMeter the checkbox "regex matching" had to be checked or nothing would be recored, even if the browser used the JMeter proxy (stopping it would cause the browser to fail getting a response).
Regex matching has nothing to do with the proxy recording itself. It only affects how the requests are processed when replacing variables. Have you defined any variables on the Test Plan? It looks like the variable replacer has been confused by something.
Hi Sebb, I narrowed it down a bit. I did not define any variables. I found out that this happens when my Thread Group has a "View Result Tree" Listener attached while recording. If I remove it, recording works fine. So: - Add a Thread Group - Add a Proxy to the workplace. Change nothing but port to 9090 (should not matter) and select the Target Controller "testplanname -> Thread Group. - Add a Listener of type "View Result Tree". - Start the proxy. - Point your browser to localhost:9090 in proxy settings. -> After clicking the first link, cpu load rises and after approx. 20 seconds on a core 2 duo 2GHZ, 2GB RAM the 1 GB limit is reached and you should get the exception. kind regards, Achim
Just tried that, and it works fine for me when testing against www.apache.org, Google and BBC news. Does it happen to you for these sites? Or only some sites? Are you still using the JMeter command-line proxy settings? If so, can you try it without? BTW, if you want to see the pages as they are recorded by the proxy, add the listener to the proxy server.
Thanks for your patience. This time I took more time to isolate the error. It seems to be as you said in first place. - Just click the add button in the top - level test plan. A user defined var is created. Leave it empty. - Now start the proxy session. Record to a Thread group. --> The error should occur. - This happens also when starting JMeter without proxy settings (had to test with localhost tomcat). kind regards, Achim
I just spent a long and frustrating day debugging my script to find this bug: ${} insertion and "out of memory" error. Please fix this bug!
Fixed in SVN r66718
Thanks a lot!
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2125