Journal RevMike's Journal: Yargg!! Another one for Sam 4
Another guy on my team is having trouble with jMeter. jMeter is a open source testing program which we were using to simulate various load conditions on our software. His core skills don't include Java, so I went to help him out.
We kept getting java.lang.OutOfMemory exceptions while trying to run various test scripts. The cases that were triggering it were bigger cases, but nothing absurdly big.
"No problem," I thought, "I'll just bump up the heap size." I edited the jmeter shell script and bumped the memory devoted to jmeter to 1.75 Gig. Still no luck. Then I started playing with various settings - If you become a java developer remind me to teach you about generational garbage collecting. Still no luck.
After two days I noticed the follwoing: All these settings were defined throughout the shell script. At the very end of the script, they were all combined into a shell variable calls ARGS, and then java was invoked. It looked something like this:
ARGS="$MODE $HEAP $SURVIVORSPACE $GCMETHOD"
java -classpath $CLASSPATH -jar jmeter.jar
This simple change, two days later, made everything work:
ARGS="$MODE $HEAP $SURVIVORSPACE $GCMETHOD"
java $ARGS -classpath $CLASSPATH -jar jmeter.jar
To make it worse, the customer was looking over my shoulder when I discovered it. He had a good long laugh at my expense.
According to my wife (Score:1)
You're allowed to be an idiot once a day.... ;-)
Re: (Score:2)
Re:Thanks for posting this (Score:2)
Mike: (holding up a mirror) DAMN, I look sooooooooo good! AND, I'm the Java king. What did this worthless idiot do? *I'LL* fix it.
**double take**
Mike: shit.
--------
Of course, that sort of thing *NEVER* happens to me....Uh-uh.
Buy your own pizza from now on! (Score:2)
Have I mentioned recently how much I am beginning to dislike you? :)
But I do look good.